MED_NHANES_FPED
MED_NHANES_FPED.Rd
Calculate the MED for the NHANES_FPED data (after 2005) within 1 step
Usage
MED_NHANES_FPED(
FPED_PATH = NULL,
NUTRIENT_PATH = NULL,
DEMO_PATH,
FPED_PATH2 = NULL,
NUTRIENT_PATH2 = NULL
)
Arguments
- FPED_PATH
The file path for the FPED data. The file name should be like: fpre_dr1tot_1718.sas7bdat
- NUTRIENT_PATH
The file path for the NUTRIENT data. The file name should be like: DR1TOT_J.XPT
- DEMO_PATH
The file path for the DEMOGRAPHIC data. The file name should be like: DEMO_J.XPT
- FPED_PATH2
The file path for the FPED data. The file name should be like: fpre_dr2tot_1718.sas7bdat
- NUTRIENT_PATH2
The file path for the NUTRIENT data. The file name should be like: DR2TOT_J.XPT
Examples
data("NHANES_20172018")
MED_NHANES_FPED(FPED_PATH = NHANES_20172018$FPED, NUTRIENT_PATH = NHANES_20172018$NUTRIENT, DEMO_PATH = NHANES_20172018$DEMO, FPED_PATH2 = NHANES_20172018$FPED2, NUTRIENT_PATH2 = NHANES_20172018$NUTRIENT2)
#> Reminder: this MED index uses medians to rank participants' food/drink serving sizes and then calculate MED component scores, which may generate results that are specific to your study population but not comparable to other populations.
#> # A tibble: 6,174 × 12
#> SEQN MED_ALL MED_NOETOH MED_FRT MED_VEG MED_WGRAIN MED_LEGUMES MED_NUTS
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 93704 3.5 3.5 1 0 0.5 0 0
#> 2 93705 3.5 3.5 0 0.5 0 1 0.5
#> 3 93707 2.5 2.5 0 0.5 1 0.5 0
#> 4 93708 3.5 3.5 0.5 0.5 0.5 0 0.5
#> 5 93711 5.5 5.5 1 1 0.5 1 1
#> 6 93712 3 3 0.5 1 0.5 0.5 0
#> 7 93713 3.5 3.5 1 1 0.5 0.5 0
#> 8 93714 1.5 1.5 0 0 0.5 0 0
#> 9 93715 0.5 0.5 0 0 0 0 0
#> 10 93716 6 6 1 1 0.5 1 1
#> # ℹ 6,164 more rows
#> # ℹ 4 more variables: MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
#> # MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>