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
)

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

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")
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)
#> [1] "VITD is included in the calculation in the first day of NHANES data."
#> [1] "VITD is included in the calculation in the second day of NHANES data."
#> [1] "Reminder: This function does not use all the original DII variables. Eugenol, garlic, ginger, onion, trans fat, turmeric, Green/black tea, Flavan-3-ol, Flavones, Flavonols, Flavonones, Anthocyanidins, Isoflavones, Pepper, Thyme/oregano, Rosemary are not included because they are not available in NHANES."
#> # A tibble: 6,174 × 31
#>     SEQN DII_ALL DII_NOETOH    ALCOHOL  VITB12    VITB6 BCAROTENE CAFFEINE
#>    <dbl>   <dbl>      <dbl>      <dbl>   <dbl>    <dbl>     <dbl>    <dbl>
#>  1 93704   3.18      2.90    0.278     -0.0263  0.0738      0.560   0.0849
#>  2 93705   3.05      2.77    0.278     -0.0942  0.305       0.223   0.0833
#>  3 93707   3.18      2.90    0.278     -0.0427  0.0267      0.564   0.0849
#>  4 93708   3.21      2.93    0.278     -0.0721  0.216       0.451   0.0849
#>  5 93711  -0.732    -0.732  -0.0000238 -0.0578 -0.185       0.223   0.0828
#>  6 93712   0.289     0.0114  0.278      0.0207 -0.329       0.534   0.0845
#>  7 93713   1.26      0.984   0.278     -0.0477 -0.140       0.274   0.0826
#>  8 93714   3.16      2.89    0.278     -0.0601  0.00904     0.561   0.0846
#>  9 93715   4.57      4.29    0.278     -0.0745  0.309       0.562   0.0824
#> 10 93716  -1.62     -1.90    0.278      0.0245 -0.357      -0.237   0.0844
#> # ℹ 6,164 more rows
#> # ℹ 23 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>