AHEI_NHANES_MPED
AHEI_NHANES_MPED.Rd
Calculate the AHEI for the NHANES_MPED data (before 2005, 1999-2004) within 1 step for day 1, day 2, or day 1 and 2 combined (age >= 2 only)
Usage
AHEI_NHANES_MPED(
MPED_PER_100_GRAM_PATH = NULL,
WJFRT = NULL,
NUTRIENT_PATH = NULL,
NUTRIENT_IND_PATH = NULL,
DEMO_PATH,
NUTRIENT_PATH2 = NULL,
NUTRIENT_IND_PATH2 = NULL,
SSB_code = NULL
)
Arguments
- MPED_PER_100_GRAM_PATH
The file path for the MPED per 100 gram data for the day 1 and day 2 data. The file name should be like: pyr_tot_d1.sas7bdat
- WJFRT
The file path for the WJFRT data for the day 1 and day2 data. The file name should be like: wjfrt.sas7bdat
- NUTRIENT_PATH
The file path for the NUTRIENT data for the day 1 data. The file name should be like: DR1TOT_J.XPT or DRXTOT_B.XPT
- NUTRIENT_IND_PATH
The file path for the NUTRIENT_IND data for the day 1 data. The file name should be like: DR1IFF_J.XPT
- DEMO_PATH
The file path for the DEMOGRAPHIC data. The file name should be like: DEMO_J.XPT
- NUTRIENT_PATH2
The file path for the NUTRIENT2 data for the day 2 data. The file name should be like: DR2TOT_J.XPT
- NUTRIENT_IND_PATH2
The file path for the NUTRIENT_IND2 data for the day 2 data The file name should be like: DR2IFF_J.XPT
- SSB_code
The food code for sugar sweetened beverage, default is the SSB code from 17-18 FNDDS file.
Examples
data("NHANES_20032004")
AHEI_NHANES_MPED(MPED_PER_100_GRAM_PATH = NHANES_20032004$MPED_PER_100_GRAM, WJFRT = NHANES_20032004$WJFRT, NUTRIENT_PATH = NHANES_20032004$NUTRIENT, NUTRIENT_IND_PATH = NHANES_20032004$NUTRIENT_IND, DEMO_PATH = NHANES_20032004$DEMO, NUTRIENT_PATH2 = NHANES_20032004$NUTRIENT2, NUTRIENT_IND_PATH2 = NHANES_20032004$NUTRIENT_IND2)
#> [1] "Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used."
#> # A tibble: 7,650 × 13
#> SEQN AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN AHEI_NUTSLEG
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21005 25.9 23.4 1.79 0 5 2.07
#> 2 21006 24.4 21.9 0.761 0 1.21 1.48
#> 3 21007 26.0 23.5 3.09 0.154 0 0
#> 4 21008 21.3 18.8 4.71 0 2.31 0.0363
#> 5 21009 37.1 34.6 3.29 0.277 0.0156 0.458
#> 6 21010 30.8 28.3 1.27 0.353 0 5.59
#> 7 21012 23.5 20.1 2.60 0 1.44 5.06
#> 8 21013 20.9 18.4 1.30 0.653 0 0.0617
#> 9 21014 41.5 39.0 4.83 0.445 1.06 5.03
#> 10 21015 46.3 43.8 3.04 2.11 3.38 5.03
#> # ℹ 7,640 more rows
#> # ℹ 6 more variables: AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>, AHEI_SSB_FRTJ <dbl>,
#> # AHEI_REDPROC_MEAT <dbl>, AHEI_SODIUM <dbl>, AHEI_ALCOHOL <dbl>