Skip to contents

Calculate the AHEI for the NHANES_FPED data (after 2005) within 1 step

Usage

AHEI_NHANES_FPED(
  FPED_IND_PATH = NULL,
  NUTRIENT_IND_PATH = NULL,
  FPED_IND_PATH2 = NULL,
  NUTRIENT_IND_PATH2 = NULL,
  SSB_code = NULL
)

Arguments

FPED_IND_PATH

The file path for the FPED IND data for day 1. The file name should be like: fped_dr1iff.sas7bdat

NUTRIENT_IND_PATH

The file path for the NUTRIENT IND data for day 1. The file name should be like: DR1IFF_J

FPED_IND_PATH2

The file path for the FPED IND data for day 2. The file name should be like: fped_dr2iff.sas7bdat

NUTRIENT_IND_PATH2

The file path for the NUTRIENT IND data for day 2. The file name should be like: DR2IFF_J

SSB_code

The food code for sugar sweetened beverage, default is the SSB code from 17-18 FNDDS file.

Value

The AHEI and its component scores and serving sizes

Examples

data("NHANES_20172018")
AHEI_NHANES_FPED(NHANES_20172018$FPED_IND, NHANES_20172018$NUTRIENT_IND, NHANES_20172018$FPED_IND2, NHANES_20172018$NUTRIENT_IND2)
#> Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
#> Trans fat is not avaiable for NHANES, so it is not included in the AHEI score.
#> # A tibble: 6,490 × 13
#>     SEQN AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN AHEI_NUTSLEG
#>    <dbl>    <dbl>       <dbl>    <dbl>    <dbl>       <dbl>        <dbl>
#>  1 93704     43.8        42.6     0.22    1.34        1.13          0   
#>  2 93705     39.9        38.6     3.05    0           0            10   
#>  3 93707     33.6        32.4     1.42    0           6.42          0.35
#>  4 93708     49.1        47.9     5.18    0.612       0.643         5   
#>  5 93710     44.2        42.9     0.43    2.11        2.83          1.25
#>  6 93711     53.3        48.5     6.75    1.62        3.97         10   
#>  7 93712     26.4        25.2     3.5     2.28        2.69          5   
#>  8 93713     38.8        37.6     6.08    4.61        0.961         1.85
#>  9 93714     34.8        33.6     0.04    0.25        4.99          0   
#> 10 93715     20.1        18.9     0.44    0.4         0             0   
#> # ℹ 6,480 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>