Skip to contents

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

Usage

DII_NHANES_FPED(
  FPED_PATH = NULL,
  NUTRIENT_PATH = NULL,
  DEMO_PATH,
  FPED_PATH2 = NULL,
  NUTRIENT_PATH2 = NULL,
  OTHER_INGREDIENTS1 = NULL,
  OTHER_INGREDIENTS2 = 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

OTHER_INGREDIENTS1

The file path for the DII other ingredients data for the day 1 data.

OTHER_INGREDIENTS2

The file path for the DII other ingredients data for the day 2 data.

Value

The DII and its component scores: DII is the total DII score (the sum of all component scores); DII_NOETOH is the DII score without alcohol

Examples

data("NHANES_20172018")
data("DII_OTHER_INGREDIENTS_day1")
data("DII_OTHER_INGREDIENTS_day2")
DII_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, OTHER_INGREDIENTS1 = DII_OTHER_INGREDIENTS_day1, OTHER_INGREDIENTS2 = DII_OTHER_INGREDIENTS_day2)
#> VITD is included in the calculation in the first day of NHANES data.
#> VITD is included in the calculation in the second day of NHANES data.
#> Reminder: This function does not use all the original DII variables. Eugenol, trans fat, turmeric, Green/black tea, Rosemary are not included.
#> Day 1 and Day 2 data are used for the calculation.
#> Note: Flavonoid data is only available for NHANES 2007-2010 and 2017-2018.
#> # A tibble: 6,174 × 42
#>     SEQN DII_ALL DII_NOETOH    ALCOHOL  VITB12    VITB6 BCAROTENE CAFFEINE
#>    <dbl>   <dbl>      <dbl>      <dbl>   <dbl>    <dbl>     <dbl>    <dbl>
#>  1 93704   5.81       5.53   0.278     -0.0263  0.0738      0.560   0.0849
#>  2 93705   5.35       5.07   0.278     -0.0942  0.305       0.223   0.0833
#>  3 93707   6.31       6.03   0.278     -0.0427  0.0267      0.564   0.0849
#>  4 93708   5.81       5.53   0.278     -0.0721  0.216       0.451   0.0849
#>  5 93711  -0.139     -0.139 -0.0000238 -0.0578 -0.185       0.223   0.0828
#>  6 93712   2.90       2.62   0.278      0.0207 -0.329       0.534   0.0845
#>  7 93713   2.13       1.85   0.278     -0.0477 -0.140       0.274   0.0826
#>  8 93714   5.95       5.67   0.278     -0.0601  0.00904     0.561   0.0846
#>  9 93715   7.07       6.79   0.278     -0.0745  0.309       0.562   0.0824
#> 10 93716   0.662      0.384  0.278      0.0245 -0.357      -0.237   0.0844
#> # ℹ 6,164 more rows
#> # ℹ 34 more variables: CARB <dbl>, CHOLES <dbl>, KCAL <dbl>, TOTALFAT <dbl>,
#> #   FIBER <dbl>, FOLICACID <dbl>, IRON <dbl>, MG <dbl>, MUFA <dbl>,
#> #   NIACIN <dbl>, N3FAT <dbl>, N6FAT <dbl>, PROTEIN <dbl>, PUFA <dbl>,
#> #   RIBOFLAVIN <dbl>, SATFAT <dbl>, SE <dbl>, THIAMIN <dbl>, VITA <dbl>,
#> #   VITC <dbl>, VITE <dbl>, ZN <dbl>, VITD <dbl>, GARLIC <dbl>, GINGER <dbl>,
#> #   ONION <dbl>, FLA3OL <dbl>, FLAVONES <dbl>, FLAVONOLS <dbl>, …