Skip to contents

Getting Started

Title: Dietaryindex: A User-Friendly and Versatile R Package for Standardizing Dietary Pattern Analysis in Epidemiological and Clinical Studies
Authors: Jiada James Zhan et al.

The dietaryindex package currently contains the following key functions:

Note: all NHANES functions allow users to enter the first day data, or the second day data, or first day + second day data and return the results accordingly. See examples later.

dietaryindex has compiled NHANES data from 2005 - 2020 for your convenience. This includes NHANES 2005-2006, 2007-2008, 2009-2010, 2011-2012, 2013-2014, 2015-2016, 2017-2018, 2017-2020. To retrieve the data:

Then, you may use the following codes to load the data:

# set up working dictionary
setwd("/Users/james/Library/Mobile Documents/com~apple~CloudDocs/Desktop/Emory University - Ph.D./dietaryindex_package/NHANES_combined/dietaryindex_NHANES/data/NHANES_combined")

## NHANES 2005-2006, for example
load("NHANES_20052006.rda")

Examples for data format:


NHANES data format

# install.packages("devtools") #If you don't have "devtools" installed already
# devtools::install_github("jamesjiadazhan/dietaryindex") # Install the package from GitHub
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
library(dietaryindex)

## load dplyr package for data processing
library(dplyr)
## load the survey package for NHANES data
library(survey)
## Warning: package 'survival' was built under R version 4.3.3
## load the gtsummary package for summarizing the results
library(gtsummary)

data("NHANES_20172018")
Food pattern data for the 2017-2018 first day data
knitr::kable(head(NHANES_20172018$FPED))
SEQN RIAGENDR RIDAGEYR RIDRETH3 SDMVPSU SDMVSTRA INDFMIN2 INDFMPIR WTDRD1 WTDR2D DR1DRSTZ DRABF DRDINT DR1TNUMF DR1T_F_TOTAL DR1T_F_CITMLB DR1T_F_OTHER DR1T_F_JUICE DR1T_V_TOTAL DR1T_V_DRKGR DR1T_V_REDOR_TOTAL DR1T_V_REDOR_TOMATO DR1T_V_REDOR_OTHER DR1T_V_STARCHY_TOTAL DR1T_V_STARCHY_POTATO DR1T_V_STARCHY_OTHER DR1T_V_OTHER DR1T_V_LEGUMES DR1T_G_TOTAL DR1T_G_WHOLE DR1T_G_REFINED DR1T_PF_TOTAL DR1T_PF_MPS_TOTAL DR1T_PF_MEAT DR1T_PF_CUREDMEAT DR1T_PF_ORGAN DR1T_PF_POULT DR1T_PF_SEAFD_HI DR1T_PF_SEAFD_LOW DR1T_PF_EGGS DR1T_PF_SOY DR1T_PF_NUTSDS DR1T_PF_LEGUMES DR1T_D_TOTAL DR1T_D_MILK DR1T_D_YOGURT DR1T_D_CHEESE DR1T_OILS DR1T_SOLID_FATS DR1T_ADD_SUGARS DR1T_A_DRINKS
93703 2 2 6 2 145 15 5.00 0.000 NA 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93704 1 2 3 1 143 15 5.00 81714.005 82442.869 1 2 2 13 0.99 0 0.00 0.99 0.82 0.00 0.03 0.03 0.00 0.73 0.73 0.00 0.06 0.00 3.03 0.00 3.03 3.52 3.30 0.00 0.00 0 2.12 1.18 0 0.22 0.00 0.00 0.00 1.73 1.06 0 0.67 23.16 9.53 9.12 0
93705 2 66 4 2 145 3 0.82 7185.561 5640.391 1 2 2 17 0.00 0 0.00 0.00 1.50 0.31 0.59 0.16 0.42 0.14 0.11 0.03 0.46 0.15 2.10 0.00 2.10 0.80 0.00 0.00 0.00 0 0.00 0.00 0 0.01 0.79 0.00 0.58 0.22 0.03 0 0.19 21.68 31.14 19.42 0
93706 1 18 6 2 134 NA NA 6463.883 0.000 1 2 1 8 0.00 0 0.00 0.00 0.72 0.00 0.50 0.30 0.20 0.00 0.00 0.00 0.23 0.00 4.51 0.00 4.51 8.79 8.79 0.00 0.00 0 8.79 0.00 0 0.00 0.00 0.00 0.00 2.03 0.00 0 2.03 58.16 39.73 1.64 0
93707 1 13 7 1 138 10 1.88 15333.777 22707.067 1 2 2 16 0.00 0 0.00 0.00 0.94 0.00 0.01 0.01 0.00 0.93 0.93 0.00 0.00 0.00 5.26 4.12 1.14 5.61 3.62 0.00 1.56 0 2.06 0.00 0 1.99 0.00 0.00 0.00 0.26 0.26 0 0.00 22.79 48.34 18.65 0
93708 2 66 6 2 138 6 1.63 10825.545 22481.854 1 2 2 14 0.49 0 0.49 0.00 2.33 0.00 0.04 0.00 0.04 0.03 0.00 0.03 2.26 0.00 3.53 0.34 3.19 4.73 2.16 2.16 0.00 0 0.00 0.00 0 0.00 0.00 2.57 0.00 0.06 0.06 0 0.00 19.13 31.15 6.00 0
Nutrient data for the 2017-2018 first day data
knitr::kable(head(NHANES_20172018$NUTRIENT))
SEQN WTDRD1 WTDR2D DR1DRSTZ DR1EXMER DRABF DRDINT DR1DBIH DR1DAY DR1LANG DR1MRESP DR1HELP DBQ095Z DBD100 DRQSPREP DR1STY DR1SKY DRQSDIET DRQSDT1 DRQSDT2 DRQSDT3 DRQSDT4 DRQSDT5 DRQSDT6 DRQSDT7 DRQSDT8 DRQSDT9 DRQSDT10 DRQSDT11 DRQSDT12 DRQSDT91 DR1TNUMF DR1TKCAL DR1TPROT DR1TCARB DR1TSUGR DR1TFIBE DR1TTFAT DR1TSFAT DR1TMFAT DR1TPFAT DR1TCHOL DR1TATOC DR1TATOA DR1TRET DR1TVARA DR1TACAR DR1TBCAR DR1TCRYP DR1TLYCO DR1TLZ DR1TVB1 DR1TVB2 DR1TNIAC DR1TVB6 DR1TFOLA DR1TFA DR1TFF DR1TFDFE DR1TCHL DR1TVB12 DR1TB12A DR1TVC DR1TVD DR1TVK DR1TCALC DR1TPHOS DR1TMAGN DR1TIRON DR1TZINC DR1TCOPP DR1TSODI DR1TPOTA DR1TSELE DR1TCAFF DR1TTHEO DR1TALCO DR1TMOIS DR1TS040 DR1TS060 DR1TS080 DR1TS100 DR1TS120 DR1TS140 DR1TS160 DR1TS180 DR1TM161 DR1TM181 DR1TM201 DR1TM221 DR1TP182 DR1TP183 DR1TP184 DR1TP204 DR1TP205 DR1TP225 DR1TP226 DR1_300 DR1_320Z DR1_330Z DR1BWATZ DR1TWSZ DRD340 DRD350A DRD350AQ DRD350B DRD350BQ DRD350C DRD350CQ DRD350D DRD350DQ DRD350E DRD350EQ DRD350F DRD350FQ DRD350G DRD350GQ DRD350H DRD350HQ DRD350I DRD350IQ DRD350J DRD350JQ DRD350K DRD360 DRD370A DRD370AQ DRD370B DRD370BQ DRD370C DRD370CQ DRD370D DRD370DQ DRD370E DRD370EQ DRD370F DRD370FQ DRD370G DRD370GQ DRD370H DRD370HQ DRD370I DRD370IQ DRD370J DRD370JQ DRD370K DRD370KQ DRD370L DRD370LQ DRD370M DRD370MQ DRD370N DRD370NQ DRD370O DRD370OQ DRD370P DRD370PQ DRD370Q DRD370QQ DRD370R DRD370RQ DRD370S DRD370SQ DRD370T DRD370TQ DRD370U DRD370UQ DRD370V
93703 0.000 NA 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93704 81714.005 82442.869 1 49 2 2 7 2 1 2 12 4 NA 2 2 NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 13 1230 51.58 160.46 76.97 5.9 43.24 11.372 14.333 12.506 144 5.80 0 254 262 1 94 1 684 321 0.679 0.959 15.617 1.369 100 33 66 123 198.1 3.83 0 60.1 8.1 38.2 700 1170 151 3.55 4.18 0.497 2198 1970 52.9 8 54 0 875.00 0.219 0.166 0.119 0.273 0.291 1.050 6.577 2.098 0.337 13.682 0.392 0.029 11.087 1.054 0.031 0.079 0.080 0.027 0.150 2 240 240 0 91 1 2 NA 1 2 1 1 2 NA 2 NA 2 NA 2 NA 1 2 2 NA 2 NA 2 1 1 1 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 1 1 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2
93705 7185.561 5640.391 1 73 2 2 5 1 1 1 11 4 NA 3 2 NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 17 1202 20.01 157.45 91.55 8.4 56.98 16.435 16.432 19.786 14 5.66 0 32 436 1551 4096 2 1573 1645 0.589 1.237 7.576 0.458 179 32 146 202 95.0 0.33 0 21.4 0.2 155.5 314 466 162 8.80 2.93 0.689 3574 1640 22.1 361 120 0 1773.88 0.156 0.077 0.058 0.122 0.145 0.447 8.951 5.980 0.118 16.047 0.101 0.014 17.805 1.943 0.000 0.014 0.001 0.001 0.001 2 315 315 0 1 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93706 6463.883 0.000 1 86 2 1 NA 6 1 1 12 1 1 3 2 NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 8 1987 94.19 89.82 14.73 7.1 137.39 35.169 45.805 49.873 462 10.02 0 198 431 872 2363 2 4605 313 1.152 1.033 26.831 1.821 267 125 139 354 367.9 2.30 0 9.7 0.7 138.4 869 1025 187 8.52 8.05 0.614 3657 1247 118.5 0 0 0 3405.40 0.263 0.203 0.140 0.377 0.459 1.816 23.150 7.747 3.387 41.577 0.524 0.011 44.097 5.074 0.016 0.308 0.021 0.044 0.021 3 3042 0 3042 1 1 1 2 2 NA 2 NA 2 NA 1 2 1 1 2 NA 2 NA 2 NA 2 NA 2 1 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 1 1 2 NA 2 NA 2 NA 2 NA 1 3 2 NA 1 3 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2
93707 15333.777 22707.067 1 81 2 2 14 2 1 1 12 1 9 2 2 NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 16 1775 59.48 188.15 84.22 10.9 89.18 33.252 33.712 12.424 585 8.92 0 443 449 0 70 9 516 579 0.755 1.296 13.920 0.951 124 15 110 135 369.4 2.08 0 12.9 2.7 23.5 535 945 215 8.42 8.30 0.955 2450 1769 91.9 21 133 0 2222.41 1.015 0.616 0.414 0.849 1.138 3.383 17.280 7.815 1.807 32.089 0.284 0.046 11.221 0.873 0.002 0.237 0.008 0.015 0.058 2 1785 1545 240 99 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 9 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93708 10825.545 22481.854 1 73 2 2 41 7 6 1 9 4 NA 4 2 NA 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 14 1251 50.96 123.71 49.84 16.6 65.49 17.446 29.000 14.823 71 6.20 0 35 236 323 2245 26 0 2148 1.143 0.840 15.368 1.096 260 74 185 311 175.7 1.09 0 146.4 0.8 137.0 412 635 248 11.49 6.45 1.049 2135 1631 54.3 33 69 0 2821.95 0.070 0.044 0.027 0.091 0.097 0.499 9.440 6.126 0.446 28.177 0.310 0.003 13.927 0.804 0.000 0.038 0.001 0.004 0.000 2 2160 720 1440 1 1 2 NA 2 NA 2 NA 1 2 2 NA 2 NA 2 NA 1 2 2 NA 2 NA 2 1 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 1 6 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2 NA 2
Demographic data for the 2017-2018 first and second day data
knitr::kable(head(NHANES_20172018$DEMO))
SEQN SDDSRVYR RIDSTATR RIAGENDR RIDAGEYR RIDAGEMN RIDRETH1 RIDRETH3 RIDEXMON RIDEXAGM DMQMILIZ DMQADFC DMDBORN4 DMDCITZN DMDYRSUS DMDEDUC3 DMDEDUC2 DMDMARTL RIDEXPRG SIALANG SIAPROXY SIAINTRP FIALANG FIAPROXY FIAINTRP MIALANG MIAPROXY MIAINTRP AIALANGA DMDHHSIZ DMDFMSIZ DMDHHSZA DMDHHSZB DMDHHSZE DMDHRGND DMDHRAGZ DMDHREDZ DMDHRMAZ DMDHSEDZ WTINT2YR WTMEC2YR SDMVPSU SDMVSTRA INDHHIN2 INDFMIN2 INDFMPIR
93703 10 2 2 2 NA 5 6 2 27 NA NA 1 1 NA NA NA NA NA 1 1 2 1 2 2 NA NA NA NA 5 5 3 0 0 1 2 3 1 3 9246.492 8539.731 2 145 15 15 5.00
93704 10 2 1 2 NA 3 3 1 33 NA NA 1 1 NA NA NA NA NA 1 1 2 1 2 2 NA NA NA NA 4 4 2 0 0 1 2 3 1 2 37338.768 42566.615 1 143 15 15 5.00
93705 10 2 2 66 NA 4 4 2 NA 2 NA 1 1 NA NA 2 3 NA 1 2 2 1 2 2 1 2 2 1 1 1 0 0 1 2 4 1 2 NA 8614.571 8338.420 2 145 3 3 0.82
93706 10 2 1 18 NA 5 6 2 222 2 NA 1 1 NA 15 NA NA NA 1 2 2 NA NA NA 1 2 2 1 5 5 0 0 1 1 4 3 1 2 8548.633 8723.440 2 134 NA NA NA
93707 10 2 1 13 NA 5 7 2 158 NA NA 1 1 NA 6 NA NA NA 1 1 2 1 2 2 1 2 2 1 7 7 0 3 0 1 3 2 1 3 6769.345 7064.610 1 138 10 10 1.88
93708 10 2 2 66 NA 5 6 2 NA 2 NA 2 1 7 NA 1 1 NA 1 2 1 1 2 2 1 2 1 3 2 2 0 0 2 1 4 1 1 1 13329.451 14372.489 2 138 6 6 1.63
Food pattern data for the 2017-2018 second day data
knitr::kable(head(NHANES_20172018$FPED2))
SEQN RIAGENDR RIDAGEYR RIDRETH3 SDMVPSU SDMVSTRA INDFMIN2 INDFMPIR WTDRD1 WTDR2D DR2DRSTZ DRABF DRDINT DR2TNUMF DR2T_F_TOTAL DR2T_F_CITMLB DR2T_F_OTHER DR2T_F_JUICE DR2T_V_TOTAL DR2T_V_DRKGR DR2T_V_REDOR_TOTAL DR2T_V_REDOR_TOMATO DR2T_V_REDOR_OTHER DR2T_V_STARCHY_TOTAL DR2T_V_STARCHY_POTATO DR2T_V_STARCHY_OTHER DR2T_V_OTHER DR2T_V_LEGUMES DR2T_G_TOTAL DR2T_G_WHOLE DR2T_G_REFINED DR2T_PF_TOTAL DR2T_PF_MPS_TOTAL DR2T_PF_MEAT DR2T_PF_CUREDMEAT DR2T_PF_ORGAN DR2T_PF_POULT DR2T_PF_SEAFD_HI DR2T_PF_SEAFD_LOW DR2T_PF_EGGS DR2T_PF_SOY DR2T_PF_NUTSDS DR2T_PF_LEGUMES DR2T_D_TOTAL DR2T_D_MILK DR2T_D_YOGURT DR2T_D_CHEESE DR2T_OILS DR2T_SOLID_FATS DR2T_ADD_SUGARS DR2T_A_DRINKS
93703 2 2 6 2 145 15 5.00 0.000 NA 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93704 1 2 3 1 143 15 5.00 81714.005 82442.869 1 2 2 13 1.94 0.61 0.46 0.87 0.02 0 0.02 0.02 0.00 0.00 0 0.00 0.00 0.00 5.00 0.72 4.28 0.46 0.00 0.00 0.0 0 0.00 0.00 0.00 0.46 0.00 0.0 0.00 1.74 1.54 0 0.19 19.42 10.28 17.25 0
93705 2 66 4 2 145 3 0.82 7185.561 5640.391 1 2 2 14 0.03 0.00 0.00 0.03 0.29 0 0.28 0.25 0.03 0.00 0 0.00 0.01 0.23 5.39 0.00 5.39 2.75 0.30 0.00 0.3 0 0.00 0.00 0.00 2.05 0.00 0.4 0.91 0.52 0.00 0 0.51 25.40 20.01 8.67 0
93706 1 18 6 2 134 NA NA 6463.883 0.000 5 2 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93707 1 13 7 1 138 10 1.88 15333.777 22707.067 1 2 2 14 0.00 0.00 0.00 0.00 0.70 0 0.06 0.06 0.00 0.64 0 0.64 0.00 0.00 2.94 0.90 2.04 10.29 7.98 6.69 0.0 0 1.29 0.00 0.00 2.25 0.07 0.0 0.00 0.04 0.04 0 0.00 30.07 38.10 18.15 0
93708 2 66 6 2 138 6 1.63 10825.545 22481.854 1 2 2 15 0.00 0.00 0.00 0.00 0.26 0 0.00 0.00 0.00 0.00 0 0.00 0.26 0.00 2.59 0.00 2.59 2.34 2.31 0.00 0.0 0 0.89 0.94 0.48 0.03 0.00 0.0 0.00 1.14 1.11 0 0.00 10.13 24.19 6.44 0
Nutrient data for the 2017-2018 second day data
knitr::kable(head(NHANES_20172018$NUTRIENT2))
SEQN WTDRD1 WTDR2D DR2DRSTZ DR2EXMER DRABF DRDINT DR2DBIH DR2DAY DR2LANG DR2MRESP DR2HELP DR2TNUMF DR2STY DR2SKY DR2TKCAL DR2TPROT DR2TCARB DR2TSUGR DR2TFIBE DR2TTFAT DR2TSFAT DR2TMFAT DR2TPFAT DR2TCHOL DR2TATOC DR2TATOA DR2TRET DR2TVARA DR2TACAR DR2TBCAR DR2TCRYP DR2TLYCO DR2TLZ DR2TVB1 DR2TVB2 DR2TNIAC DR2TVB6 DR2TFOLA DR2TFA DR2TFF DR2TFDFE DR2TCHL DR2TVB12 DR2TB12A DR2TVC DR2TVD DR2TVK DR2TCALC DR2TPHOS DR2TMAGN DR2TIRON DR2TZINC DR2TCOPP DR2TSODI DR2TPOTA DR2TSELE DR2TCAFF DR2TTHEO DR2TALCO DR2TMOIS DR2TS040 DR2TS060 DR2TS080 DR2TS100 DR2TS120 DR2TS140 DR2TS160 DR2TS180 DR2TM161 DR2TM181 DR2TM201 DR2TM221 DR2TP182 DR2TP183 DR2TP184 DR2TP204 DR2TP205 DR2TP225 DR2TP226 DR2_300 DR2_320Z DR2_330Z DR2BWATZ DR2TWSZ
93703 0.000 NA 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93704 81714.005 82442.869 1 87 2 2 18 6 1 2 12 13 2 NA 1356 30.49 229.69 134.37 8.2 37.02 10.368 10.443 13.249 70 3.75 0 562 589 0 299 67 3835 174 1.407 1.562 10.871 1.189 360 311 50 577 223.0 4.74 2.08 38.3 5.4 58.2 761 879 147 10.06 8.13 0.473 1345 1413 46.9 6 54 0 795.87 0.251 0.161 0.099 0.221 0.239 0.796 5.929 2.366 0.168 10.084 0.155 0.010 11.601 1.581 0.003 0.041 0.000 0.002 0.010 2 0 0 0 91
93705 7185.561 5640.391 1 91 2 2 15 4 1 1 12 14 2 NA 1235 38.52 147.49 43.04 13.1 55.19 14.079 19.882 17.072 402 6.15 0 217 267 156 510 15 7884 582 1.001 1.274 8.549 0.418 231 93 139 295 323.8 1.25 0.00 3.3 3.5 31.2 693 738 156 10.52 4.48 0.893 2447 1158 67.9 146 19 0 1973.77 0.104 0.082 0.063 0.170 0.217 0.613 8.728 3.519 0.441 19.072 0.176 0.003 15.339 1.365 0.001 0.201 0.002 0.011 0.059 2 960 0 960 1
93706 6463.883 0.000 5 NA 2 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
93707 15333.777 22707.067 1 78 2 2 22 3 1 1 4 14 1 1 1794 92.03 153.12 85.81 7.9 93.98 31.098 35.405 17.827 656 10.70 0 235 248 16 88 123 2136 1160 0.428 1.240 23.431 1.827 125 19 106 136 521.5 4.94 0.00 8.1 2.8 66.5 227 1136 180 13.69 14.23 0.834 2581 1805 122.2 10 322 0 1398.45 0.251 0.156 0.123 0.283 0.524 1.657 18.588 8.756 1.574 33.294 0.255 0.009 15.732 1.568 0.001 0.327 0.004 0.025 0.061 3 1020 780 240 99
93708 10825.545 22481.854 1 43 2 2 56 1 1 1 12 15 2 NA 842 32.85 83.92 42.37 2.8 41.52 14.962 13.227 8.662 126 2.98 0 277 323 2 536 3 0 236 0.483 0.640 7.768 0.525 103 57 46 143 139.6 3.36 0.00 3.4 10.9 49.1 535 599 99 2.77 2.98 0.332 1241 831 39.7 0 12 0 1934.55 0.226 0.169 0.115 0.264 0.361 1.265 9.269 2.986 0.630 11.879 0.779 0.025 7.398 0.984 0.025 0.043 0.082 0.035 0.132 2 1524 510 1014 1

ASA24 data format:

ASA24 dietary data for each individual
data("ASA24_exp")
knitr::kable(head(ASA24_exp))
RecallRecId UserName UserID RecallNo RecallAttempt RecallStatus IntakeStartDateTime IntakeEndDateTime ReportingDate Lang NumFoods NumCodes AmtUsual KCAL PROT TFAT CARB MOIS ALC CAFF THEO SUGR FIBE CALC IRON MAGN PHOS POTA SODI ZINC COPP SELE VC VB1 VB2 NIAC VB6 FOLA FA FF FDFE VB12 VARA RET BCAR ACAR CRYP LYCO LZ ATOC VK CHOLE SFAT S040 S060 S080 S100 S120 S140 S160 S180 MFAT M161 M181 M201 M221 PFAT P182 P183 P184 P204 P205 P225 P226 VITD CHOLN VITE_ADD B12_ADD F_TOTAL F_CITMLB F_OTHER F_JUICE V_TOTAL V_DRKGR V_REDOR_TOTAL V_REDOR_TOMATO V_REDOR_OTHER V_STARCHY_TOTAL V_STARCHY_POTATO V_STARCHY_OTHER V_OTHER V_LEGUMES G_TOTAL G_WHOLE G_REFINED PF_TOTAL PF_MPS_TOTAL PF_MEAT PF_CUREDMEAT PF_ORGAN PF_POULT PF_SEAFD_HI PF_SEAFD_LOW PF_EGGS PF_SOY PF_NUTSDS PF_LEGUMES D_TOTAL D_MILK D_YOGURT D_CHEESE OILS SOLID_FATS ADD_SUGARS A_DRINKS DataComp
960a78fa-fdf8-417d-a5d2-e29d7984ac8d 1 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 23 23 1 2019.1261 64.00808 97.71591 235.86038 2386.6157 0 36.88 41.2 74.68865 23.631891 1104.3000 15.024851 483.81516 1150.5633 2965.253 3415.849 8.317065 1.6922004 103.06994 53.30264 1.6393786 1.5903095 22.102181 1.5142930 393.9672 149.24784 244.7193 496.3751 2.959247 960.4294 320.5494 7330.914 765.8908 22.90329 813.3750 16872.0702 20.156954 567.0490 217.0211 20.891319 0.2926330 0.2030142 0.1435912 0.2999671 0.3031705 1.0094686 12.634695 4.442925 46.080027 0.6288449 44.737310 0.5006182 0.00030 25.233201 23.46477 1.5142505 0.00030 0.1190309 0.000528 0.0043849 0.0265132 5.545659 320.0657 6.8564 1.5372 0.40730 0.0000 0.39530 0.01200 2.006828 0.971500 0.3217283 0.1807500 0.1409784 0.36150 0.180750 0.180750 0.3521000 0.0930 6.86142 1.784250 5.077170 5.913528 0.00000 0 0.00000 0 0.00000 0 0 0.9115442 0.2126250 4.789359 0.3690 0.6840 0.6840 0 0 61.89215 12.830923 10.928636 0 1
960a78fa-fdf8-417d-a5d2-e29d7984ac8c 1 e6541891-8a22-49e5-b1c0-fbb853234a73 2 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 23 23 1 1009.5630 32.00404 48.85796 117.93019 1193.3079 0 18.44 20.6 37.34432 11.815945 552.1500 7.512426 241.90758 575.2816 1482.626 1707.924 4.158532 0.8461002 51.53497 26.65132 0.8196893 0.7951547 11.051090 0.7571465 196.9836 74.62392 122.3597 248.1876 1.479623 480.2147 160.2747 3665.457 382.9454 11.45165 406.6875 8436.0351 10.078477 283.5245 108.5106 10.445659 0.1463165 0.1015071 0.0717956 0.1499836 0.1515853 0.5047343 6.317347 2.221462 23.040013 0.3144225 22.368655 0.2503091 0.00015 12.616600 11.73238 0.7571252 0.00015 0.0595154 0.000264 0.0021924 0.0132566 2.772829 160.0329 3.4282 0.7686 0.20365 0.0000 0.19765 0.00600 1.003414 0.485750 0.1608642 0.0903750 0.0704892 0.18075 0.090375 0.090375 0.1760500 0.0465 3.43071 0.892125 2.538585 2.956764 0.00000 0 0.00000 0 0.00000 0 0 0.4557721 0.1063125 2.394679 0.1845 0.3420 0.3420 0 0 30.94608 6.415462 5.464318 0 1
cee8c74d-51a2-4629-b92f-6bbdb5793fd6 2 dbb278b0-b589-442a-88fd-9a68fd986a91 1 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 10 10 2 1246.7375 48.24150 55.36362 145.31270 2452.3924 0 96.00 0.0 71.76457 10.042250 831.9350 5.861650 186.70250 758.3275 2361.782 3808.492 4.948700 0.7704950 41.95375 155.40625 0.5238725 1.0762800 10.140018 1.4799800 306.3900 41.98000 264.4100 332.7700 0.421650 592.5575 275.4900 3394.180 750.6900 103.62000 7350.6575 1641.6150 7.406650 214.1842 135.8750 16.216413 0.4035600 0.1527600 0.1392600 0.2849400 0.2373300 1.5209750 8.760355 3.949800 17.413210 0.5344450 16.516858 0.0928200 0.00090 15.803205 14.12976 1.5046100 0.00090 0.0810300 0.000000 0.0065100 0.0089550 2.802000 256.0770 0.0000 0.0000 1.48800 0.0000 0.00000 1.48800 2.140250 0.618450 0.3484250 0.2520250 0.0964000 0.42190 0.096400 0.325500 0.7514750 0.1446 2.99510 0.079800 2.915300 2.903700 2.53890 0 0.00000 0 2.53890 0 0 0.3648000 0.0000000 0.000000 0.4820 0.0456 0.0456 0 0 19.24660 23.699800 5.198400 0 1
cee8c74d-51a2-4629-b92f-6bbdb5793fd7 2 dbb278b0-b589-442a-88fd-9a68fd986a91 2 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 10 10 2 623.3687 24.12075 27.68181 72.65635 1226.1962 0 48.00 0.0 35.88229 5.021125 415.9675 2.930825 93.35125 379.1637 1180.891 1904.246 2.474350 0.3852475 20.97687 77.70312 0.2619362 0.5381400 5.070009 0.7399900 153.1950 20.99000 132.2050 166.3850 0.210825 296.2788 137.7450 1697.090 375.3450 51.81000 3675.3288 820.8075 3.703325 107.0921 67.9375 8.108206 0.2017800 0.0763800 0.0696300 0.1424700 0.1186650 0.7604875 4.380178 1.974900 8.706605 0.2672225 8.258429 0.0464100 0.00045 7.901603 7.06488 0.7523050 0.00045 0.0405150 0.000000 0.0032550 0.0044775 1.401000 128.0385 0.0000 0.0000 0.74400 0.0000 0.00000 0.74400 1.070125 0.309225 0.1742125 0.1260125 0.0482000 0.21095 0.048200 0.162750 0.3757375 0.0723 1.49755 0.039900 1.457650 1.451850 1.26945 0 0.00000 0 1.26945 0 0 0.1824000 0.0000000 0.000000 0.2410 0.0228 0.0228 0 0 9.62330 11.849900 2.599200 0 1
1f9daf51-8540-4fef-9f49-fe56c4b1ac54 3 f0115426-e6f8-4c6f-aeaa-065c615c85bd 1 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 14 14 2 2206.4860 65.89972 100.11426 267.77062 1770.4026 0 0.00 0.0 123.37104 16.349200 1136.0940 18.384940 221.62600 1205.8780 2440.166 4415.830 11.695100 0.7360300 68.76180 208.30220 1.8280460 2.2464920 29.188010 2.7669520 437.1660 160.00000 277.1660 553.6660 6.074620 821.8680 751.6020 637.836 125.8860 303.95200 100.6600 1051.0980 11.616760 117.3554 219.8120 26.972348 0.0040000 0.0024000 0.0108500 0.0122500 0.0100900 1.4957080 16.320104 7.901016 41.234728 1.8123080 38.692992 0.3343900 0.00184 22.686492 20.30833 1.9270220 0.00380 0.1777100 0.012290 0.0056700 0.0158500 4.339800 279.7190 3.4282 3.2986 1.88170 0.9936 0.00000 0.88810 2.800000 0.000000 0.3960000 0.0000000 0.3960000 0.75400 0.490000 0.264000 1.6500000 0.0000 5.48100 0.272000 5.209000 6.792320 6.36552 0 2.75562 0 3.60990 0 0 0.2560000 0.0000000 0.170800 0.0000 0.0560 0.0560 0 0 29.05440 49.324960 17.793340 0 1
1f9daf51-8540-4fef-9f49-fe56c4b1ac55 3 f0115426-e6f8-4c6f-aeaa-065c615c85bd 2 0 2 1/18/22 0:00 1/18/22 23:59 1/19/22 1 14 14 2 1103.2430 32.94986 50.05713 133.88531 885.2013 0 0.00 0.0 61.68552 8.174600 568.0470 9.192470 110.81300 602.9390 1220.083 2207.915 5.847550 0.3680150 34.38090 104.15110 0.9140230 1.1232460 14.594005 1.3834760 218.5830 80.00000 138.5830 276.8330 3.037310 410.9340 375.8010 318.918 62.9430 151.97600 50.3300 525.5490 5.808380 58.6777 109.9060 13.486174 0.0020000 0.0012000 0.0054250 0.0061250 0.0050450 0.7478540 8.160052 3.950508 20.617364 0.9061540 19.346496 0.1671950 0.00092 11.343246 10.15416 0.9635110 0.00190 0.0888550 0.006145 0.0028350 0.0079250 2.169900 139.8595 1.7141 1.6493 0.94085 0.4968 0.00000 0.44405 1.400000 0.000000 0.1980000 0.0000000 0.1980000 0.37700 0.245000 0.132000 0.8250000 0.0000 2.74050 0.136000 2.604500 3.396160 3.18276 0 1.37781 0 1.80495 0 0 0.1280000 0.0000000 0.085400 0.0000 0.0280 0.0280 0 0 14.52720 24.662480 8.896670 0 1
ASA24 detailed food data for all foods consumed by each individual
data("ASA24_exp_detailed")
knitr::kable(head(ASA24_exp_detailed))
RecallRecId UserName UserID RecallNo RecallAttempt RecallStatus IntakeStartDateTime IntakeEndDateTime ReportingDate Lang Occ_No Occ_Time Occ_Name EatWith WatchTVuseComputer Location FoodNum FoodType FoodSrce CodeNum FoodCode ModCode HowMany SubCode PortionCode FoodAmt KCAL PROT TFAT CARB MOIS ALC CAFF THEO SUGR FIBE CALC IRON MAGN PHOS POTA SODI ZINC COPP SELE VC VB1 VB2 NIAC VB6 FOLA FA FF FDFE VB12 VARA RET BCAR ACAR CRYP LYCO LZ ATOC VK CHOLE SFAT S040 S060 S080 S100 S120 S140 S160 S180 MFAT M161 M181 M201 M221 PFAT P182 P183 P184 P204 P205 P225 P226 VITD CHOLN VITE_ADD B12_ADD F_TOTAL F_CITMLB F_OTHER F_JUICE V_TOTAL V_DRKGR V_REDOR_TOTAL V_REDOR_TOMATO V_REDOR_OTHER V_STARCHY_TOTAL V_STARCHY_POTATO V_STARCHY_OTHER V_OTHER V_LEGUMES G_TOTAL G_WHOLE G_REFINED PF_TOTAL PF_MPS_TOTAL PF_MEAT PF_CUREDMEAT PF_ORGAN PF_POULT PF_SEAFD_HI PF_SEAFD_LOW PF_EGGS PF_SOY PF_NUTSDS PF_LEGUMES D_TOTAL D_MILK D_YOGURT D_CHEESE OILS SOLID_FATS ADD_SUGARS A_DRINKS FoodComp Food_Description
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 1 1 Supermarket or grocery store 1 51180010 0 0.5 0 62015 34.5 91.08 3.6432 0.4554 18.0711 11.66445 0 0.0 0.0 2.90835 0.552 36.225 1.23165 10.005 34.155 36.915 145.59 0.28635 0.04416 7.4175 0.00 0.19596 0.11868 1.557675 0.02415 36.57 28.29 8.28 56.235 0.0000 0.00 0.00 0.0 0 0 0 0.0 0.0345 0.069 0.0 0.1242 0.0000 0.0000 0.0000 0.0000 0.000 0.00138 0.078315 0.039675 0.13455 0.002415 0.06417 0.001725 0 0.18147 0.173535 0.00828 0 0.0000 0 0.0000 0.0000 0.00 5.037 0.0000 0.0000 0.000 0 0 0.000 0 0 0 0 0 0 0 0 0 0.000 1.45935 0 1.45935 0.0000 0 0 0 0 0 0 0 0.00 0 0.0000 0.000 0.000 0.000 0 0 0.0000 0.000 0.39675 0 1 Bagel
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 2 1 Supermarket or grocery store 2 31105030 0 1.0 0 61238 40.0 86.00 5.3080 6.8960 0.3040 26.72800 0 0.0 0.0 0.15600 0.000 23.600 0.74400 5.200 83.600 58.400 182.80 0.54400 0.03040 12.9600 0.00 0.01440 0.18360 0.030000 0.06840 14.80 0.00 14.80 14.800 0.3200 67.60 67.60 0.0 0 4 0 212.4 0.7800 3.520 157.2 1.7148 0.0016 0.0000 0.0016 0.0024 0.000 0.01400 1.223600 0.434800 2.75160 0.095200 2.62440 0.023200 0 1.99360 1.697200 0.16640 0 0.0796 0 0.0028 0.0244 0.84 105.520 0.0000 0.0000 0.000 0 0 0.000 0 0 0 0 0 0 0 0 0 0.000 0.00000 0 0.00000 0.7600 0 0 0 0 0 0 0 0.76 0 0.0000 0.000 0.000 0.000 0 0 2.8800 1.796 0.00000 0 1 Egg, whole, fried with oil
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 3 1 Supermarket or grocery store 3 41205070 0 2.0 0 21000 30.0 78.00 2.4540 5.3340 5.9580 15.44700 0 0.0 0.0 0.87300 1.770 33.900 1.00800 13.500 70.800 75.300 144.30 0.52200 0.15300 2.6700 1.35 0.09150 0.03870 0.408900 0.03660 33.90 0.00 33.90 33.900 0.0000 0.30 0.00 5.1 0 0 0 0.6 0.3270 1.710 0.0 0.7287 0.0000 0.0000 0.0000 0.0006 0.000 0.00840 0.515400 0.172800 2.56620 0.032400 2.52060 0.009900 0 1.75350 1.707600 0.04440 0 0.0000 0 0.0000 0.0000 0.00 8.640 0.0000 0.0000 0.012 0 0 0.012 0 0 0 0 0 0 0 0 0 0.093 0.00000 0 0.00000 0.3660 0 0 0 0 0 0 0 0.00 0 0.3660 0.369 0.000 0.000 0 0 3.9450 0.087 0.00000 0 1 Hummus, plain
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 4 1 Not applicable 4 94000100 0 32.0 0 30000 960.0 0.00 0.0000 0.0000 0.0000 959.04000 0 0.0 0.0 0.00000 0.000 28.800 0.00000 9.600 0.000 0.000 38.40 0.09600 0.09600 0.0000 0.00 0.00000 0.00000 0.000000 0.00000 0.00 0.00 0.00 0.000 0.0000 0.00 0.00 0.0 0 0 0 0.0 0.0000 0.000 0.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.000 0.00000 0.000000 0.000000 0.00000 0.000000 0.00000 0.000000 0 0.00000 0.000000 0.00000 0 0.0000 0 0.0000 0.0000 0.00 0.000 0.0000 0.0000 0.000 0 0 0.000 0 0 0 0 0 0 0 0 0 0.000 0.00000 0 0.00000 0.0000 0 0 0 0 0 0 0 0.00 0 0.0000 0.000 0.000 0.000 0 0 0.0000 0.000 0.00000 0 1 Water, tap
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 5 1 Supermarket or grocery store 5 92306800 0 6.0 0 30000 180.0 90.00 2.7900 1.7640 16.1640 158.67000 0 16.2 1.8 15.87600 0.180 102.600 0.07200 12.600 77.400 151.200 39.60 0.37800 0.02340 2.7000 0.00 0.03420 0.16560 0.081000 0.03240 9.00 0.00 9.00 9.000 0.4140 45.00 45.00 3.6 0 0 0 0.0 0.0360 0.180 7.2 1.0728 0.0504 0.0378 0.0306 0.0414 0.045 0.18000 0.468000 0.203400 0.46260 0.012600 0.44100 0.000000 0 0.09000 0.061200 0.02880 0 0.0000 0 0.0000 0.0000 1.08 13.680 0.0000 0.0000 0.000 0 0 0.000 0 0 0 0 0 0 0 0 0 0.000 0.00000 0 0.00000 0.0000 0 0 0 0 0 0 0 0.00 0 0.0000 0.000 0.342 0.342 0 0 0.0000 1.206 2.75400 0 1 Tea, hot, chai, with milk
960a78fa-fdf8-417d-a5d2-e29d7984ac8d THR01 e6541891-8a22-49e5-b1c0-fbb853234a73 1 0 2 01/18/2022 0:00 01/18/2022 23:59 01/19/2022 1 1 01/18/2022 7:00 1 NA 4 1 6 2 Supermarket or grocery store 6 11350020 0 0.5 0 10205 122.0 18.30 0.7198 1.3420 0.7076 118.40100 0 0.0 0.0 0.00000 0.000 240.340 0.42700 8.540 12.200 81.740 86.62 0.08540 0.03538 0.2440 0.00 0.07320 0.05734 0.091500 0.01830 1.22 0.00 1.22 1.220 0.7686 52.46 52.46 0.0 0 0 0 0.0 3.4282 0.000 0.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.000 0.00000 0.000000 0.000000 0.86376 0.007320 0.85644 0.000000 0 0.28792 0.287920 0.00000 0 0.0000 0 0.0000 0.0000 1.22 0.000 3.4282 0.7686 0.000 0 0 0.000 0 0 0 0 0 0 0 0 0 0.000 0.00000 0 0.00000 0.1708 0 0 0 0 0 0 0 0.00 0 0.1708 0.000 0.000 0.000 0 0 0.7686 0.000 0.00000 0 1 Almond milk, unsweetened

DHQ3 data format:

DHQ3 dietary data for each individual
#Use the example data
data("DHQ3_exp")
knitr::kable(head(DHQ3_exp))
Respondent ID Record Number Sex (1=male; 2=female) Age Questionnaire Date (YYYYMMDD) Gram weight (g) Energy (kcal) *Gluten (g) Alcohol (g) Protein (g) *Nitrogen (g) *Total protein (g) *Animal protein (g) *Vegetable protein (g) Total fat (g) *Solid fat (g) Total saturated fatty acids (g) Total monounsaturated fatty acids (g) Total polyunsaturated fatty acids (g) *Total saturated fatty acids (g) *Total monounsaturated fatty acids (g) *Total polyunsaturated fatty acids (g) *Polyunsaturated to saturated fatty acid ratio Cholesterol (mg) *Cholesterol to saturated fatty acid index Carbohydrate (g) Total sugars (g) *Total sugars (g) *Added sugars (g) *Added sugars by total sugars (g) *Available carbohydrate (g) *Glycemic load (glucose reference) *Glycemic load (bread reference) *Fructose (g) *Galactose (g) *Glucose (g) *Lactose (g) *Maltose (g) *Sucrose (g) *Starch (g) Dietary fiber (g) *Total dietary fiber (g) *Soluble dietary fiber (g) *Insoluble dietary fiber (g) *Pectins (g) Retinol (mcg) *Total vitamin A activity (International Units) (IU) Vitamin A, retinol activity (mcg) *Total vitamin A activity (RE) (mcg) Beta-carotene (mcg) *Beta-carotene (mcg) Alpha-carotene (mcg) Beta-cryptoxanthin (mcg) Lutein + zeaxanthin (mcg) Lycopene (mcg) Vitamin E as alpha-tocopherol (mg) *Vitamin E (Alpha Tocopherol) (mg) Added alpha-tocopherol (mg) *Total alpha-tocopherol (mg) *Beta-tocopherol (mg) *Gamma-tocopherol (mg) *Delta-tocopherol (mg) *Vitamin E (International Units) (IU) *Natural alpha-tocopherol (RRR-alpha-tocopherol or d-alpha-tocopherol) (mg) *Synthetic alpha-tocopherol (all rac-alpha-tocopherol or dl-alpha-tocopherol) (mg) Vitamin K (mcg) Vitamin C (mg) Thiamin (Vitamin B1) (mg) Riboflavin (Vitamin B2) (mg) Niacin (mg) *Niacin (mg) Vitamin B6 (mg) Total folate (mcg) Folate, dietary folate (mcg) Food folate (mcg) Folic acid (mcg) Vitamin B12 (mcg) Added vitamin B12 (mcg) *Pantothenic acid (mg) Vitamin D (D2 + D3) (mcg) *Vitamin D (calciferol) (mcg) *Vitamin D (ergocalciferol) (mcg) *Vitamin D (cholecalciferol (mcg) Calcium (mg) Phosphorus (mg) Magnesium (mg) Iron (mg) Zinc (mg) Copper (mg) Selenium (mcg) Sodium (mg) Potassium (mg) *Manganese (mg) SFA 4:0 (Butanoic) (g) SFA 6:0 (Hexanoic) (g) SFA 8:0 (Octanoic) (g) SFA 10:0 (Decanoic) (g) SFA 12:0 (Dodecanoic) (g) SFA 14:0 (Tetradecanoic) (g) SFA 16:0 (Hexadecanoic) (g) *SFA 17:0 (margaric acid) (g) SFA 18:0 (Octadecanoic) (g) *SFA 20:0 (arachidic acid) (g) *SFA 22:0 (behenic acid) (g) MFA 16:1 (Hexadecenoic) (g) MFA 18:1 (Octadecenoic) (g) MFA 20:1 (Eicosenoic) (g) MFA 22:1 (Docosenoic) (g) *MFA 14:1 (Myristoleic) (g) PFA 18:2 (Octadecadienoic) (g) PFA 18:3 (Octadecatrienoic) (g) *PFA 18:3 N3 (Alpha linolenic) (g) PFA 18:4 (Octadecatetraenoic) (g) PFA 20:4 (Eicosatetraenoic) (g) PFA 20:5 (Eicosapentaenoic) (g) PFA 22:5 (Docosapentaenoic) (g) PFA 22:6 (Docosahexaenoic) (g) *Trans 18:1 (Trans-octadecenoic acid [elaidic acid]) (g) *Trans 18:2 (Trans-octadecadienoic acid [linolelaidic acid]; incl. c-t, t-c, t-t) (g) *Trans 16:1 (Trans-hexadecenoic acid) (g) *Total trans fatty acitds (g) *Omega-3 fatty acids (g) *CLA 18:2 (Linoleic) (g) *CLA cis9 trans11 (g) *CLA trans10 cis12 (g) *Tryptophan (g) *Threonine (g) *Isoleucine (g) *Leucine (g) *Lysine (g) *Methionine (g) *Cystine (g) *Phenylalanine (g) *Tyrosine (g) *Valine (g) *Arginine (g) *Histidine (g) *Alanine (g) *Aspartic acid (g) *Glutamin acid (g) *Glycine (g) *Proline (g) *Serine (g) *Daidzein (mg) *Genistein (mg) *Glycitein (mg) *Coumestrol (mg) *Biochanin A (mg) *Formononetin (mg) *Erythritol (g) *Inositol (g) *Isomalt (g) *Lactitol (g) *Maltitol (g) *Mannitol (g) *Pinitol (g) *Sorbitol (g) *Xylitol (g) Caffeine (mg) Theobromine (mg) Moisture (g) *Water (g) Total Choline (mg) *Aspartame (mg) *Saccharin (mg) *Phytic acid (mg) *Oxalic acid (mg) *3-Methylhistidine (mg) *Sucrose polyester (g) *Ash (g) *Acesulfame potassium (mg) *Sucralose (mg) *Tagatose (g) *Betaine (mg) Citrus, melon, berry fruit (cups) Other fruit (cups) Fruits (cups) Juice fruit (cups) Total fruit (cups) Dark-green vegetable (cups) Red/orange tomato vegetable (cups) Red/orange other vegetable (cups) Total red/orange vegetable (cups) White potato starchy vegetable (cups) Other starchy vegetable (cups) Total starchy vegetable (cups) Other vegetable (cups) Total vegetable (cups) Legumes vegetable (cups) Whole grain (oz) Refined grain (oz) Total number of grain (oz) Meat from beef, pork, veal, lamb, and game protein foods (oz) Cured meat protein foods (oz) Meat from organ meat protein foods (oz) Poultry protein foods (oz) Seafood high in omega-3 protein foods (oz) Seafood low in omega-3 protein foods (oz) Seafood (oz) Total meat, poultry, seafood protein foods (oz) Eggs protein foods (oz) Meat, poultry, and eggs (oz) Soy products protein foods (oz) Nuts and seeds protein foods (oz) Legumes protein foods (oz) Nuts, seeds, soy, and legumes (oz) Total protein foods (oz) Milk (cups) Yogurt (cups) Cheese (cups) Total dairy (cups) Oil (g) Solid fat (g) Added sugars (tsp) Alcohol (drink(s)) Energy from fat (% kcal) Energy from carbohydrates (% kcal) Energy from protein (% kcal) Energy from alcohol (% kcal) Energy from saturated fatty acids (% kcal) Energy from monounsaturated fatty acids (% kcal) Energy from polyunsaturated fatty acids (% kcal) SUPP_ENERGY_KCAL_DSID SUPP_PROTEIN_G_DSID SUPP_TOTAL_FAT_G_DSID SUPP_TOTAL_POLYUNSATURATED_FATTY_ACIDS_G_DSID SUPP_CHOLESTEROL_MG_DSID SUPP_CARBOHYDRATE_G_DSID SUPP_TOTAL_SUGARS_G_DSID SUPP_DIETARY_FIBER_G_DSID SUPP_SOLUBLE_DIETARY_FIBER_G_DSID SUPP_TOTAL_VITAMIN_A_ACTIVITY_IU_DSID SUPP_VITAMIN_A_RAE_MCG_DSID SUPP_BETA_CAROTENE_PERCENT_DSID SUPP_LUTEIN_ZEAXANTHIN_MCG_DSID SUPP_LYCOPENE_MCG_DSID SUPP_BIOTIN_MCG_DSID SUPP_VITAMIN_E_AS_ALPHA_TOCOPHEROL_MG_DSID SUPP_VITAMIN_E_IU_DSID SUPP_VITAMIN_K_MCG_DSID SUPP_VITAMIN_C_MG_DSID SUPP_THIAMIN_VITAMIN_B1_MG_DSID SUPP_RIBOFLAVIN_VITAMIN_B2_MG_DSID SUPP_NIACIN_MG_DSID SUPP_VITAMIN_B6_MG_DSID SUPP_FOLATE_DFE_MCG_DSID SUPP_FOLIC_ACID_MCG_DSID SUPP_VITAMIN_B12_MCG_DSID SUPP_PANTOTHENIC_ACID_MG_DSID SUPP_VITAMIN_D_D2+D3_MCG_DSID SUPP_BORON_MCG_DSID SUPP_CALCIUM_MG_DSID SUPP_CHLORIDE_MG_DSID SUPP_CHROMIUM_MCG_DSID SUPP_COPPER_MG_DSID SUPP_FLUORIDE_MG_DSID SUPP_IODINE_MCG_DSID SUPP_IRON_MG_DSID SUPP_MAGNESIUM_MG_DSID SUPP_MANGANESE_MG_DSID SUPP_MOLYBDENUM_MCG_DSID SUPP_NICKEL_MCG_DSID SUPP_PHOSPHORUS_MG_DSID SUPP_POTASSIUM_MG_DSID SUPP_SELENIUM_MCG_DSID SUPP_SILICON_MG_DSID SUPP_SODIUM_MG_DSID SUPP_TIN_MCG_DSID SUPP_VANADIUM_MCG_DSID SUPP_ZINC_MG_DSID SUPP_PFA_20_5_EICOSAPENTAENOIC_ACID_G_DSID SUPP_PFA_22_6_DOCOSAHEXAENOIC_ACID_G_DSID SUPP_OMEGA_3_FATTY_ACIDS_G_DSID SUPP_INOSITOL_G_DSID SUPP_CHOLINE_MG_DSID Total HEI-2015 Score HEI-2015 - Total Vegetables - Component Score HEI-2015 - Greens and Beans - Component Score HEI-2015 - Total Fruits - Component Score HEI-2015 - Whole Fruits - Component Score HEI-2015 - Whole Grains - Component Score HEI-2015 - Dairy - Component Score HEI-2015 - Total Protein Foods - Component Score HEI-2015 - Seafood and Plant Proteins - Component Score HEI-2015 - Fatty Acids - Component Score HEI-2015 - Sodium - Component Score HEI-2015 - Refined Grains - Component Score HEI-2015 - Saturated Fats - Component Score HEI-2015 - Added Sugars - Component Score HEI-2015 - Density of Total Vegetables per 1000 Kcal HEI-2015 - Density of Greens and Beans per 1000 Kcal HEI-2015 - Density of Total Fruits per 1000 Kcal HEI-2015 - Density of Whole Fruits per 1000 Kcal HEI-2015 - Density of Whole Grains per 1000 Kcal HEI-2015 - Density of Dairy per 1000 Kcal HEI-2015 - Density of Total Protein Foods per 1000 Kcal HEI-2015 - Density of Seafood and Plant Proteins per 1000 Kcal HEI-2015 - Fatty Acid Ratio HEI-2015 - Density of Sodium per 1000 Kcal HEI-2015 - Density of Refined Grains per 1000 Kcal HEI-2015 - Percent of Calories from Saturated Fats HEI-2015 - Percent of Calories from Added Sugars
1 1 1 24 20220108 3898.66 1849.01 5.09 0.00 87.88 14.25 88.38 54.11 34.27 75.11 27.64 22.48 27.15 18.85 23.57 24.38 19.52 19.98 238.41 35.57 209.48 51.82 51.61 16.87 13.67 192.49 108.61 155.30 10.56 0.19 11.59 12.31 1.66 14.98 125.49 22.13 23.35 5.53 17.81 3.07 251.24 13821.42 833.93 1566.50 6627.53 7739.48 650.51 75.45 7224.13 3568.97 7.76 7.61 0.00 9.69 0.44 18.51 5.05 11.33 7.61 0.00 398.50 77.83 2.15 1.80 25.98 42.49 2.05 436.72 528.47 306.57 130.27 4.40 0.26 4.85 4.97 5.26 0.01 5.26 966.28 1321.90 437.24 14.61 13.36 1.47 123.76 3360.72 2787.80 4.59 0.33 0.20 0.31 0.43 1.14 1.90 12.10 0.08 5.38 0.13 0.10 0.99 25.39 0.33 0.05 0.16 15.32 3.16 3.09 0.01 0.11 0.04 0.02 0.07 2.05 0.36 0.04 2.47 3.27 0.11 0.08 0.03 1.00 3.51 3.94 6.93 6.20 1.97 1.11 3.96 2.99 4.62 5.18 2.62 4.44 8.20 15.80 3.85 4.93 4.10 1.58 2.08 0.33 0.06 0.47 0.00 0.00 0.41 0 0 0 0.18 0.01 0.15 0.02 181.66 11.75 3507.29 3531.87 354.78 25.12 0.00 849.95 326.50 21.94 0.00 16.67 4.21 0.54 0.39 140.98 0.31 0.62 0.93 0.00 0.93 0.53 0.17 0.17 0.34 0.09 0.10 0.17 0.67 1.72 0.54 2.29 3.94 6.23 4.42 0.30 0.01 0.26 0.27 0.18 0.45 5.47 0.33 5.32 0.38 0.09 2.18 2.65 6.26 0.96 0.04 0.15 1.14 31.12 23.51 3.29 0.00 36.56 45.32 19.01 0.00 10.94 13.22 9.18 0.00 0 0.00 0.00 114.29 0.00 0.00 0 0 1000.00 300.00 8.29 0.00 0 8.57 5.74 8.57 7.14 17.14 0.43 0.49 5.71 0.57 194.29 114.29 1.71 2.86 2.86 21.43 57.14 20.57 10.00 0.14 0 42.86 5.14 14.29 0.66 12.86 1.43 5.71 22.86 15.71 0.57 0 2.86 2.86 3.14 0.00 0.00 0.00 0 0.00 74.69 5.00 5.00 3.16 5.00 8.25 4.76 5.00 5.00 6.51 2.03 8.67 6.32 10.00 1.23 0.58 0.50 0.50 1.24 0.62 4.57 1.67 2.05 1.82 2.13 10.94 2.85
2 2 2 24 20220126 2371.25 1109.42 6.13 0.00 38.77 6.63 39.97 9.76 30.21 44.95 11.37 10.65 17.96 13.01 10.57 15.58 13.88 13.52 138.93 17.47 146.33 39.47 38.56 12.39 10.83 121.57 67.11 95.94 9.92 0.12 10.03 1.68 2.27 14.14 74.37 20.13 21.16 5.24 15.93 2.65 220.55 11657.31 734.01 1301.83 5879.28 6585.29 496.10 82.43 2800.94 2671.64 7.66 8.79 1.49 10.60 0.76 10.59 2.44 13.36 8.45 0.77 138.07 68.13 1.33 1.03 12.53 20.05 1.43 373.02 468.66 236.34 136.78 1.64 0.99 2.82 1.75 1.80 0.27 1.53 563.58 718.57 233.49 11.96 6.85 1.11 51.72 1841.31 1724.09 3.64 0.12 0.07 0.10 0.14 0.40 0.63 6.17 0.04 2.39 0.19 0.29 0.36 17.20 0.21 0.00 0.03 11.53 1.31 1.30 0.00 0.07 0.00 0.01 0.02 0.81 0.16 0.02 0.99 1.32 0.02 0.02 0.00 0.48 1.40 1.67 2.97 2.02 0.71 0.63 1.98 1.27 1.96 2.57 1.02 1.73 3.86 8.32 1.68 2.63 2.03 1.67 2.35 0.36 0.00 0.41 0.01 0.00 0.29 0 0 0 0.14 0.03 0.09 0.01 0.40 5.62 2129.17 2139.36 183.66 1.37 0.17 806.87 311.97 1.32 0.01 11.70 0.04 0.04 0.27 99.39 0.23 0.63 0.87 0.01 0.88 0.30 0.17 0.27 0.44 0.10 0.04 0.14 0.34 1.22 0.42 1.27 3.44 4.72 0.16 0.03 0.00 0.17 0.00 0.01 0.01 0.37 0.59 0.96 0.41 1.44 1.67 3.51 2.81 0.11 0.01 0.23 0.36 22.09 11.49 3.03 0.00 36.46 52.76 13.98 0.00 8.64 14.57 10.55 0.00 0 0.00 0.00 0.00 0.00 0.00 0 0 0.00 0.00 0.00 0.00 0 1.99 0.00 0.00 0.00 9.95 6.64 1.33 1.66 0.13 45.13 26.55 1.00 0.37 1.66 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 77.84 5.00 5.00 4.97 5.00 7.65 2.46 5.00 5.00 10.00 3.78 4.78 9.20 10.00 1.48 0.64 0.80 0.78 1.15 0.32 4.03 3.17 2.91 1.66 3.10 8.64 4.37
3 3 2 23 20220126 5364.16 2133.67 5.35 5.88 74.24 12.01 74.22 39.80 34.42 75.58 34.91 22.30 29.17 17.31 22.31 30.90 15.75 60.57 201.31 32.25 291.08 137.34 134.10 70.97 64.43 259.50 145.27 207.70 34.64 0.23 31.54 7.76 1.90 59.33 93.86 28.81 32.69 10.95 21.75 5.54 262.22 20258.83 1192.88 2184.25 9996.00 11679.51 2152.91 190.05 8073.37 16992.22 13.38 12.48 1.86 14.96 0.39 15.61 2.42 18.98 11.87 1.34 438.97 283.18 1.58 2.43 28.44 40.13 2.95 556.30 620.57 464.83 91.52 3.96 0.77 8.71 3.65 2.99 0.00 2.99 986.56 1320.70 411.69 14.16 11.09 1.74 86.98 3985.08 4446.37 6.33 0.50 0.29 0.20 0.44 0.48 1.91 12.47 0.12 5.09 0.17 0.15 1.01 26.96 0.27 0.01 0.15 15.18 1.74 1.62 0.01 0.10 0.03 0.02 0.07 3.32 0.45 0.06 3.84 1.80 0.12 0.10 0.02 0.83 2.85 3.10 5.40 4.69 1.47 0.91 3.12 2.31 3.56 4.20 1.90 3.55 7.19 13.93 3.12 4.37 3.19 0.65 0.75 0.09 0.30 0.69 0.01 0.13 0.79 0 0 0 0.57 0.02 0.55 0.03 555.54 50.94 4891.41 4927.34 360.63 3.81 0.01 796.90 365.39 12.98 0.03 22.95 5.07 6.65 0.52 134.98 0.74 0.60 1.34 1.19 2.53 0.74 0.83 0.40 1.22 0.66 0.43 1.09 1.17 4.22 0.34 0.73 3.15 3.87 1.55 0.82 0.00 0.79 0.33 0.34 0.67 3.85 0.25 3.41 0.07 0.61 1.35 2.03 4.78 0.33 0.16 0.43 0.93 29.19 29.73 15.61 0.42 31.88 54.57 13.92 1.93 9.40 12.31 7.30 15.00 0 0.00 0.00 800.00 3.00 3.00 0 0 2500.00 750.00 0.00 275.00 0 1015.00 10.10 15.00 0.00 530.00 0.00 0.00 10.00 4.00 680.00 400.00 1012.00 10.00 45.00 150.00 0.00 0.00 120.00 0.00 0 0.00 0.00 114.29 0.00 37.50 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 50.00 0.00 0.00 0.00 0 0.04 69.46 5.00 5.00 5.00 5.00 2.27 3.35 5.00 5.00 6.81 1.47 10.00 8.24 7.33 2.14 0.51 1.19 0.63 0.34 0.43 2.88 1.27 2.08 1.87 1.47 9.40 11.71
4 4 2 23 20220126 1937.19 1170.43 3.14 1.51 29.28 4.58 28.27 14.37 13.90 31.92 14.29 8.38 12.02 8.55 8.79 11.83 8.77 29.33 67.69 12.29 197.39 111.50 109.45 56.12 49.51 179.54 107.52 153.70 30.57 0.18 27.86 4.36 1.75 43.89 52.80 13.14 12.99 4.15 8.82 2.33 258.65 4888.50 435.15 668.06 1917.67 2394.84 272.32 146.77 1370.05 1989.07 9.57 10.03 5.24 13.52 0.35 8.00 1.25 16.42 7.95 4.62 72.78 183.72 1.09 1.24 17.12 19.88 2.06 322.73 437.01 159.52 163.20 3.50 2.25 4.50 3.67 2.61 0.50 2.11 824.13 654.44 183.48 11.41 6.96 0.74 35.28 1412.48 2052.53 2.51 0.16 0.09 0.07 0.14 0.22 0.63 4.69 0.03 2.02 0.06 0.04 0.32 11.38 0.11 0.01 0.03 7.78 0.59 0.59 0.01 0.03 0.02 0.01 0.04 1.80 0.22 0.01 2.04 0.68 0.04 0.03 0.01 0.31 1.03 1.15 2.05 1.71 0.58 0.36 1.21 0.90 1.38 1.62 0.71 1.41 2.80 5.35 1.20 1.85 1.24 0.13 0.17 0.03 0.08 0.05 0.01 0.10 0.53 0 0 0 0.14 0.00 0.62 0.02 6.67 7.19 1667.00 1679.93 125.70 5.98 0.45 401.48 115.24 4.35 0.06 8.57 4.60 7.74 0.92 75.51 0.54 0.39 0.93 1.40 2.33 0.16 0.08 0.08 0.15 0.53 0.05 0.58 0.21 1.11 0.03 0.80 1.73 2.53 0.42 0.26 0.00 0.31 0.17 0.24 0.41 1.41 0.11 1.09 0.02 0.26 0.13 0.42 1.80 0.14 0.11 0.17 0.44 14.94 9.93 11.87 0.11 24.54 67.46 10.01 0.90 6.44 9.24 6.58 15.00 0 0.00 0.00 800.00 3.00 3.00 0 0 2500.00 750.00 0.00 275.00 0 15.00 10.10 15.00 0.00 30.00 0.00 0.00 10.00 4.00 680.00 400.00 12.00 10.00 20.00 150.00 0.00 0.00 120.00 0.00 0 0.00 0.00 0.00 0.00 37.50 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0 0.04 77.27 4.43 4.19 5.00 5.00 4.57 2.86 3.30 4.43 9.66 8.81 10.00 10.00 5.01 0.97 0.17 1.99 0.79 0.68 0.37 1.65 0.71 2.46 1.21 1.48 6.44 16.23
5 5 2 30 20220126 3578.55 1237.92 5.87 8.73 49.24 7.79 48.30 32.48 15.82 49.18 27.57 17.39 17.41 10.05 17.49 18.41 8.35 9.65 197.83 27.70 139.93 53.26 54.70 26.87 24.23 126.27 73.49 105.06 11.50 0.15 11.24 5.77 1.77 24.04 58.74 12.51 11.73 3.73 7.97 1.91 256.32 5398.06 454.31 718.86 2242.58 2703.33 202.94 53.34 1909.52 2940.11 5.22 5.91 0.31 7.31 0.19 7.87 1.89 8.97 5.49 0.93 118.51 56.61 0.91 1.20 12.60 22.08 1.16 256.09 323.94 159.13 97.04 2.25 0.17 2.91 2.08 2.57 0.01 2.56 743.55 843.68 200.67 7.83 5.99 0.92 69.94 2049.54 1540.33 1.62 0.48 0.26 0.20 0.42 0.53 1.72 9.15 0.10 3.99 0.10 0.09 0.68 16.12 0.15 0.00 0.10 8.81 0.96 0.81 0.01 0.08 0.01 0.01 0.04 2.41 0.32 0.04 2.78 0.90 0.08 0.07 0.01 0.60 1.88 2.21 3.83 3.15 1.08 0.64 2.16 1.68 2.49 2.40 1.29 2.18 4.18 9.66 1.82 3.41 2.26 0.29 0.45 0.06 0.02 0.08 0.00 0.00 0.21 0 0 0 0.32 0.00 0.27 0.02 15.74 24.79 3319.15 3334.35 201.59 0.89 0.10 338.68 104.73 6.80 0.02 12.60 0.15 0.02 0.75 82.83 0.15 0.95 1.10 0.12 1.22 0.37 0.14 0.06 0.20 0.07 0.08 0.14 0.28 0.98 0.06 0.29 3.85 4.14 0.46 0.17 0.00 0.87 0.07 0.31 0.38 1.94 0.57 2.06 0.07 0.27 0.24 0.58 2.86 0.19 0.17 0.85 1.24 14.61 24.71 5.58 0.63 35.75 45.21 15.91 4.94 12.64 12.66 7.31 4.29 0 0.00 0.00 228.57 0.86 0.86 0 0 714.29 214.29 0.00 78.57 0 4.29 2.89 4.29 0.00 8.57 0.00 0.00 2.86 1.14 194.29 114.29 3.43 2.86 5.71 42.86 0.00 0.00 34.29 0.00 0 0.00 0.00 0.00 0.00 10.71 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0 0.01 63.23 3.84 5.00 5.00 5.00 1.55 7.69 4.98 4.83 2.92 3.83 4.76 4.20 9.63 0.84 0.35 0.98 0.89 0.23 1.00 2.49 0.77 1.58 1.66 3.11 12.64 7.21
6 6 2 30 20220126 3412.63 758.65 0.67 1.88 20.20 3.41 20.92 9.99 10.93 31.40 6.18 6.80 14.63 8.28 6.93 13.41 8.62 20.26 129.62 13.58 95.41 10.13 10.07 3.96 3.50 93.36 58.50 83.65 2.00 0.03 2.64 0.89 0.16 4.34 69.59 4.73 5.53 1.82 3.70 0.63 83.94 4063.41 261.56 467.80 1956.21 2253.71 341.29 18.72 2132.81 1167.57 4.22 3.88 0.11 4.87 0.34 7.58 2.03 5.82 3.82 0.14 113.93 22.91 0.67 0.55 7.69 12.24 0.66 202.32 283.54 87.75 114.94 0.77 0.10 2.44 1.13 1.10 0.00 1.10 309.88 369.15 146.88 5.39 3.43 0.65 40.47 1340.90 829.81 2.95 0.05 0.02 0.07 0.09 0.37 0.33 4.15 0.02 1.43 0.09 0.06 0.31 14.14 0.12 0.00 0.01 6.81 1.33 1.33 0.00 0.06 0.00 0.00 0.03 0.59 0.10 0.01 0.71 1.37 0.01 0.01 0.00 0.24 0.83 0.93 1.64 1.21 0.49 0.34 0.98 0.72 1.13 1.39 0.55 1.12 1.95 3.70 0.89 1.04 1.05 0.10 0.10 0.01 0.04 0.00 0.00 0.00 0.13 0 0 0 0.09 0.00 0.03 0.01 152.97 11.60 3255.11 3266.47 125.21 0.43 0.00 313.46 110.63 2.68 0.00 6.36 0.30 0.52 0.07 38.48 0.01 0.08 0.09 0.07 0.16 0.17 0.09 0.07 0.15 0.01 0.01 0.02 0.19 0.51 0.00 0.86 2.70 3.57 0.41 0.09 0.00 0.01 0.05 0.05 0.09 0.61 0.56 1.07 0.01 0.04 0.00 0.06 1.23 0.05 0.01 0.06 0.12 21.02 5.80 0.79 0.13 37.26 50.31 10.65 1.73 8.06 17.35 9.83 2.86 0 0.29 0.14 288.57 0.00 0.00 0 0 2500.00 750.00 20.71 1714.29 0 30.00 52.64 78.57 17.86 150.29 29.64 6.93 21.43 2.00 680.00 400.00 8.57 8.71 14.29 53.57 142.86 51.43 25.00 0.59 0 107.14 12.86 35.71 1.64 32.14 3.57 14.29 57.14 39.29 1.43 0 7.14 7.14 17.80 0.09 0.05 0.14 0 0.00 59.61 3.07 5.00 1.33 1.46 7.60 1.18 3.25 1.25 10.00 2.58 2.96 9.92 10.00 0.68 0.22 0.21 0.12 1.14 0.15 1.63 0.20 3.37 1.77 3.56 8.06 1.67
DHQ3 detailed food data for all foods consumed by each individual
#Use the example data
data("DHQ3_exp_detailed")
knitr::kable(head(DHQ3_exp_detailed))
Respondent ID Sex (1=male; 2=female) Question ID Food ID Size (0=sm; 1=med; 2=lg) Daily Freq Gram weight (g) Energy (kcal) *Gluten (g) Alcohol (g) Protein (g) *Nitrogen (g) *Total protein (g) *Animal protein (g) *Vegetable protein (g) Total fat (g) *Solid fat (g) Total saturated fatty acids (g) Total monounsaturated fatty acids (g) Total polyunsaturated fatty acids (g) *Total saturated fatty acids (g) *Total monounsaturated fatty acids (g) *Total polyunsaturated fatty acids (g) *Polyunsaturated to saturated fatty acid ratio Cholesterol (mg) *Cholesterol to saturated fatty acid index Carbohydrate (g) Total sugars (g) *Total sugars (g) *Added sugars (g) *Added sugars by total sugars (g) *Available carbohydrate (g) *Glycemic load (glucose reference) *Glycemic load (bread reference) *Fructose (g) *Galactose (g) *Glucose (g) *Lactose (g) *Maltose (g) *Sucrose (g) *Starch (g) Dietary fiber (g) *Total dietary fiber (g) *Soluble dietary fiber (g) *Insoluble dietary fiber (g) *Pectins (g) Retinol (mcg) *Total vitamin A activity (International Units) (IU) Vitamin A, retinol activity (mcg) *Total vitamin A activity (RE) (mcg) Beta-carotene (mcg) *Beta-carotene (mcg) Alpha-carotene (mcg) Beta-cryptoxanthin (mcg) Lutein + zeaxanthin (mcg) Lycopene (mcg) Vitamin E as alpha-tocopherol (mg) *Vitamin E (Alpha Tocopherol) (mg) Added alpha-tocopherol (mg) *Total alpha-tocopherol (mg) *Beta-tocopherol (mg) *Gamma-tocopherol (mg) *Delta-tocopherol (mg) *Vitamin E (International Units) (IU) *Natural alpha-tocopherol (RRR-alpha-tocopherol or d-alpha-tocopherol) (mg) *Synthetic alpha-tocopherol (all rac-alpha-tocopherol or dl-alpha-tocopherol) (mg) Vitamin K (mcg) Vitamin C (mg) Thiamin (Vitamin B1) (mg) Riboflavin (Vitamin B2) (mg) Niacin (mg) *Niacin (mg) Vitamin B6 (mg) Total folate (mcg) Folate, dietary folate (mcg) Food folate (mcg) Folic acid (mcg) Vitamin B12 (mcg) Added vitamin B12 (mcg) *Pantothenic acid (mg) Vitamin D (D2 + D3) (mcg) *Vitamin D (calciferol) (mcg) *Vitamin D (ergocalciferol) (mcg) *Vitamin D (cholecalciferol (mcg) Calcium (mg) Phosphorus (mg) Magnesium (mg) Iron (mg) Zinc (mg) Copper (mg) Selenium (mcg) Sodium (mg) Potassium (mg) *Manganese (mg) SFA 4:0 (Butanoic) (g) SFA 6:0 (Hexanoic) (g) SFA 8:0 (Octanoic) (g) SFA 10:0 (Decanoic) (g) SFA 12:0 (Dodecanoic) (g) SFA 14:0 (Tetradecanoic) (g) SFA 16:0 (Hexadecanoic) (g) *SFA 17:0 (margaric acid) (g) SFA 18:0 (Octadecanoic) (g) *SFA 20:0 (arachidic acid) (g) *SFA 22:0 (behenic acid) (g) MFA 16:1 (Hexadecenoic) (g) MFA 18:1 (Octadecenoic) (g) MFA 20:1 (Eicosenoic) (g) MFA 22:1 (Docosenoic) (g) *MFA 14:1 (Myristoleic) (g) PFA 18:2 (Octadecadienoic) (g) PFA 18:3 (Octadecatrienoic) (g) *PFA 18:3 N3 (Alpha linolenic) (g) PFA 18:4 (Octadecatetraenoic) (g) PFA 20:4 (Eicosatetraenoic) (g) PFA 20:5 (Eicosapentaenoic) (g) PFA 22:5 (Docosapentaenoic) (g) PFA 22:6 (Docosahexaenoic) (g) *Trans 18:1 (Trans-octadecenoic acid [elaidic acid]) (g) *Trans 18:2 (Trans-octadecadienoic acid [linolelaidic acid]; incl. c-t, t-c, t-t) (g) *Trans 16:1 (Trans-hexadecenoic acid) (g) *Total trans fatty acitds (g) *Omega-3 fatty acids (g) *CLA 18:2 (Linoleic) (g) *CLA cis9 trans11 (g) *CLA trans10 cis12 (g) *Tryptophan (g) *Threonine (g) *Isoleucine (g) *Leucine (g) *Lysine (g) *Methionine (g) *Cystine (g) *Phenylalanine (g) *Tyrosine (g) *Valine (g) *Arginine (g) *Histidine (g) *Alanine (g) *Aspartic acid (g) *Glutamin acid (g) *Glycine (g) *Proline (g) *Serine (g) *Daidzein (mg) *Genistein (mg) *Glycitein (mg) *Coumestrol (mg) *Biochanin A (mg) *Formononetin (mg) *Erythritol (g) *Inositol (g) *Isomalt (g) *Lactitol (g) *Maltitol (g) *Mannitol (g) *Pinitol (g) *Sorbitol (g) *Xylitol (g) Caffeine (mg) Theobromine (mg) Moisture (g) *Water (g) Total Choline (mg) *Aspartame (mg) *Saccharin (mg) *Phytic acid (mg) *Oxalic acid (mg) *3-Methylhistidine (mg) *Sucrose polyester (g) *Ash (g) *Acesulfame potassium (mg) *Sucralose (mg) *Tagatose (g) *Betaine (mg) Citrus, melon, berry fruit (cups) Other fruit (cups) Fruits (cups) Juice fruit (cups) Total fruit (cups) Dark-green vegetable (cups) Red/orange tomato vegetable (cups) Red/orange other vegetable (cups) Total red/orange vegetable (cups) White potato starchy vegetable (cups) Other starchy vegetable (cups) Total starchy vegetable (cups) Other vegetable (cups) Total vegetable (cups) Legumes vegetable (cups) Whole grain (oz) Refined grain (oz) Total number of grain (oz) Meat from beef, pork, veal, lamb, and game protein foods (oz) Cured meat protein foods (oz) Meat from organ meat protein foods (oz) Poultry protein foods (oz) Seafood high in omega-3 protein foods (oz) Seafood low in omega-3 protein foods (oz) Seafood (oz) Total meat, poultry, seafood protein foods (oz) Eggs protein foods (oz) Meat, poultry, and eggs (oz) Soy products protein foods (oz) Nuts and seeds protein foods (oz) Legumes protein foods (oz) Nuts, seeds, soy, and legumes (oz) Total protein foods (oz) Milk (cups) Yogurt (cups) Cheese (cups) Total dairy (cups) Oil (g) Solid fat (g) Added sugars (tsp) Alcohol (drink(s))
1 1 11 1140.4 1 0.01 4.62 0.03 0 0 0.01 0 0.00 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0.00 0 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0.27 0.02 0.00 0.00 0.00 0.00 0.22 0.23 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00 0 4.61 4.62 0 2.38 0 0 0.01 0 0 0.00 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 11 1140.3 1 0.01 4.69 0.08 0 0 0.01 0 0.01 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0.01 0 0 0 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0.37 0.05 0.00 0.00 0.00 0.00 0.36 0.34 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.58 0 4.67 4.67 0 2.41 0 0 0.01 0 0 0.00 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 12 1140.4 1 0.02 9.26 0.06 0 0 0.01 0 0.01 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0.01 0 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.32 0.54 0.04 0.00 0.00 0.00 0.01 0.44 0.46 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00 0 9.24 9.25 0 4.77 0 0 0.02 0 0 0.01 0 0 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 12 1140.3 1 0.02 9.40 0.16 0 0 0.01 0 0.01 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0.02 0 0 0 0 0.02 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.30 0.74 0.10 0.01 0.00 0.00 0.00 0.72 0.68 0.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.17 0 9.36 9.36 0 4.82 0 0 0.01 0 0 0.00 0 0 0 0.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 16 1154.2 1 2.33 1033.78 0.00 0 0 0.00 0 0.00 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0.00 0 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 101.91 0.00 20.35 0.00 0.02 0.07 0.00 26.18 0.63 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00 0 1033.54 1033.24 0 0.00 0 0 0.00 0 0 0.53 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 17 1154.2 1 2.88 1277.89 0.00 0 0 0.00 0 0.00 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0.00 0 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 125.98 0.00 25.15 0.00 0.03 0.09 0.00 32.36 0.78 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00 0 1277.60 1277.23 0 0.00 0 0 0.00 0 0 0.65 0 0 0 0.00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Block FFQ data format:

#Use the example data
data("BLOCK_exp")
knitr::kable(head(BLOCK_exp))
RESPONDENTID BOOKNUM TODAYSDATE SEX PREGNANT AGE WEIGHT HEIGHTFEET HEIGHTINCHES BMI DT_KCAL DT_PROT DT_TFAT DT_CARB DT_CALC DT_PHOS DT_IRON DT_SODI DT_POTA DT_GSH_T DT_GSH_R DT_THIA DT_RIBO DT_NIAC DT_VITC DT_SFAT DT_MFAT DT_PFAT DT_CHOL DT_FIBE DT_SOLFIBR DT_FOLFD DT_ATOC DT_ZINC DT_AN_ZN DT_VITB6 DT_MAGN DT_VARAE DT_RET DT_ACARO DT_BCARO DT_CRYPT DT_LUTZE DT_LYCO DT_FOLAC DT_VB12 DT_VITD DT_VITK DT_COPP DT_SEL DT_SUG_T DT_TRFAT DT_ISOFLV DT_QUERC DT_CYSTEN DT_METHI DT_CYSTI FOL_DFE GI GL DT_ARGININE DT_FA182 DT_FA183 DT_FA184 DT_FA204 DT_FA205 DT_FA225 DT_FA226 DT_TOTN6 DT_TOTN3 DT_FRUCT DT_LACT DT_MALT DT_GALAC DT_SUCR DT_GLUC TOTAL_CHOLINE FREE_CHOLINE PHOSPHOCHOLINE GLYCEROPHOSPHOCHOLINE_GPC PHOSPHATIDYLCHOLINE_PTD BETAINE SPHINGOMYELIN_SM DT_CAFFN DT_THEOB DT_ALCO GROUP_SOLID_COUNT GROUP_SOLID_TOTAL_FREQUENCY GROUP_SOLID_TOTAL_GRAMS PCTFAT PCTPROT PCTCARB PCTSWEET PCTALCH BA_PFAT BA_PPROT BA_PCARB GROUP_BEANFIBER_TOTAL_FIBE GROUP_VEGETABLESFRUITFIBER_TOTAL_FIBE GROUP_GRAINFIBER_TOTAL_FIBE GROUP_SUGARYBEVG_TOTAL_GRAMS GROUP_SUGARYBEVG_TOTAL_KCAL VEGSRV FRUITSRV GRAINSRV MEATSRV DAIRYSRV FATSRV WGRAINS SUP_VITA SUP_VITC SUP_VITD SUP_VITE SUP_IRON SUP_CA SUP_ZINC SUP_BCAR SUP_B1 SUP_B6 SUP_B12 SUP_FOL SUP_CU SUP_SE SUP_B2 SUP_MG SUP_NIAC SUP_OM_3 SUP_OM_6 ADD_SUG A_BEV DFAT_OIL DFAT_SOL D_CHEESE D_MILK D_TOTAL D_YOGURT F_CITMLB F_OTHER F_TOTAL F_SOLID F_JUICE JUICE100 G_NWHL G_TOTAL G_WHL LEGUMES M_EGG M_FISH_HI M_FISH_LO M_FRANK M_MEAT M_MPF M_NUTSD M_ORGAN M_POULT M_SOY V_DPYEL V_DRKGR V_OTHER V_POTATO V_STARCY V_TOMATO V_TOTAL PSFRUIT PSVEGNBP PSVEGDKG PSVEGORN PSLEGSOY PSVEGPOT PSVEGOTH PSGTOT PSGWHL PSMFP PSNUTSD PSEGGS PSDAIRY PSOILS BREAKSANDFREQ BREAKSANDQUAN OTHEREGGSFREQ OTHEREGGSQUAN SAUSAGEFREQ SAUSAGEQUAN BACONFREQ BACONQUAN PANCAKESFREQ PANCAKESQUAN COOKEDCEREALFREQ COOKEDCEREALQUAN COLDCEREALFREQ COLDCEREALQUAN MILKONCEREALFREQ BUTTERMILKFREQ BUTTERMILKQUAN YOGURTONLYFREQ YOGURTONLYQUAN CHEESEFREQ CHEESEQUAN BANANAFREQ BANANAQUAN APPLESPEARSFREQ APPLESPEARSQUAN ORANGESFREQ ORANGESQUAN GRAPEFRUITFREQ GRAPEFRUITQUAN PEACHESFREQ PEACHESQUAN CANTALOUPEFREQ CANTALOUPEQUAN STRAWBERRIESFREQ STRAWBERRIESQUAN WATERMELONFREQ WATERMELONQUAN OTHERFRUITFREQ OTHERFRUITQUAN CANNEDFRUITFREQ CANNEDFRUITQUAN BROCCOLIFREQ BROCCOLIQUAN CARROTSFREQ CARROTSQUAN CORNFREQ CORNQUAN BEANSPEASFREQ BEANSPEASQUAN SPINACHCOOKEDFREQ SPINACHCOOKEDQUAN GREENSFREQ GREENSQUAN SWEETPOTATOESFREQ SWEETPOTATOESQUAN FRIESFREQ FRIESQUAN POTATOESFREQ POTATOESQUAN COLESLAWCABBAGEFREQ COLESLAWCABBAGEQUAN GREENSALADFREQ GREENSALADQUAN TOMATOESFREQ TOMATOESQUAN SALADDRESSINGFREQ SALADDRESSINGQUAN OTHERVEGGIESFREQ OTHERVEGGIESQUAN REFRIEDBEANSFREQ REFRIEDBEANSQUAN PINTOBEANSFREQ PINTOBEANSQUAN VEGGIESTEWFREQ VEGGIESTEWQUAN VEGSOUPFREQ VEGSOUPQUAN PEASOUPFREQ PEASOUPQUAN OTHERSOUPFREQ OTHERSOUPQUAN PIZZAFREQ PIZZAQUAN SPAGHETTIFREQ SPAGHETTIQUAN MACARONIFREQ MACARONIQUAN OTHERNOODLESFREQ OTHERNOODLESQUAN TOFUFREQ TOFUQUAN MEATSUBSTITUTEFREQ MEATSUBSTITUTEQUAN EATMEAT BURGERFREQ BURGERQUAN HOTDOGFREQ HOTDOGQUAN BOLOGNAFREQ BOLOGNAQUAN MEATLOAFFREQ MEATLOAFQUAN STEAKFREQ STEAKQUAN TACOSFREQ TACOSQUAN RIBSFREQ RIBSQUAN PORKFREQ PORKQUAN VEALFREQ VEALQUAN LIVERFREQ LIVERQUAN FEETFREQ FEETQUAN MENUDOFREQ MENUDOQUAN MIXEDBEEFPORKFREQ MIXEDBEEFPORKQUAN FRIEDCHICKENFREQ FRIEDCHICKENQUAN NOTFRIEDCHICKENFREQ NOTFRIEDCHICKENQUAN MIXEDCHICKFREQ MIXEDCHICKQUAN OYSTERSFREQ OYSTERSQUAN SHELLFISHFREQ SHELLFISHQUAN TUNAFREQ TUNAQUAN FRIEDFISHFREQ FRIEDFISHQUAN NOTFRIEDFISHFREQ NOTFRIEDFISHQUAN BISCUITSFREQ BISCUITSQUAN BUNSFREQ BUNSQUAN BAGELFREQ BAGELQUAN TORTILLASFREQ TORTILLASQUAN CORNBREADFREQ CORNBREADQUAN OTHERBREADFREQ OTHERBREADQUAN RICEFREQ RICEQUAN MARGARINEFREQ MARGARINEQUAN BUTTERFREQ BUTTERQUAN PEANUTBUTTERFREQ PEANUTBUTTERQUAN JELLYFREQ JELLYQUAN MAYOFREQ MAYOQUAN SALSAFREQ SALSAQUAN MUSTARDFREQ MUSTARDQUAN SALTYSNACKSFREQ SALTYSNACKSQUAN CRACKERFREQ CRACKERQUAN NUTSFREQ NUTSQUAN POWERBARSFREQ POWERBARSQUAN BREAKFASTBARSFREQ BREAKFASTBARSQUAN DONUTFREQ DONUTQUAN CAKEFREQ CAKEQUAN COOKIESFREQ COOKIESQUAN ICECREAMFROYOFREQ ICECREAMFROYOQUAN CHOCOLATESYRUPFREQ CHOCOLATESYRUPQUAN PUMPKINPIEFREQ PUMPKINPIEQUAN OTHERPIEFREQ OTHERPIEQUAN CHOCOLATECANDYFREQ CHOCOLATECANDYQUAN CANDYFREQ CANDYQUAN MILKFREQ MILKQUAN DIETSHAKESFREQ DIETSHAKESQUAN TOMATOJUICEFREQ TOMATOJUICEQUAN ORANGEJUICEFREQ ORANGEJUICEQUAN REALJUICEFREQ REALJUICEQUAN HICFREQ HICQUAN SOMEJUICEFREQ SOMEJUICEQUAN ICEDTEAFREQ ICEDTEAQUAN KOOLAIDFREQ KOOLAIDQUAN SOFTDRINKSFREQ SOFTDRINKSQUAN BEERFREQ BEERQUAN WINEFREQ WINEQUAN LIQUORFREQ LIQUORQUAN WATERFREQ WATERQUAN COFFEEFREQ COFFEEQUAN HOTTEAFREQ HOTTEAQUAN CREAMINCOFFEE CREAMINTEA SUGARINCOFFEE COFFEESUGARTEASPOONS SUGARINTEA TEASUGARTEASPOONS VEGGIESFREQ FRUITSFREQ FATOILFREQ MILKTYPE DIETSHAKESTYPE ORANGEJUICETYPE SOFTDRINKSTYPE ICEDTEATYPE BEERTYPE BURGERTYPE HOTDOGTYPE BOLOGNATYPE SPAGHETTITYPE CHEESETYPE SALADDRESSTYPE POWERBARSTYPE BREAKFASTBARSTYPE BREADTYPE TORTILLATYPE CHOCCANDYTYPE COOKIESTYPE CAKETYPE ICECREAMFROYOTYPE JELLYTYPE FATONMEATTYPE CHICKENSKINTYPE COOKINGFATPAMORNONE COOKINGFATBUTTER COOKINGFATHALF COOKINGFATSTICKMARG COOKINGFATSOFTMARG COOKINGFATDIET COOKINGFATVEGGIE COOKINGFATOLIVE COOKINGFATLARD COOKINGFATCRISCO LCCEREALTYPE CHEERIOSTYPE TOTALTYPE FIBERONETYPE PRODUCT19TYPE ALLBRANTYPE OTHERFIBERTYPE SWEETENEDTYPE CORNFLAKESTYPE PRENATALAMOUNT PRENATALYEARS ONEADAYAMOUNT ONEADAYYEARS STRESSTABSAMOUNT STRESSTABSYEARS VITAMINAAMOUNT VITAMINAYEARS BETACAROTENEAMOUNT BETACAROTENEYEARS VITAMINCAMOUNT VITAMINCYEARS VITAMINEAMOUNT VITAMINEYEARS FOLATEAMOUNT FOLATEYEARS CALCIUMAMOUNT CALCIUMYEARS VITAMINDAMOUNT VITAMINDYEARS ZINCAMOUNT ZINCYEARS IRONAMOUNT IRONYEARS SELENIUMAMOUNT SELENIUMYEARS OMEGA3AMOUNT OMEGA3YEARS PROBIOTICSAMOUNT PROBIOTICSYEARS MINERALSYESORNO MGVITAMINCPERDAY MGVITAMINEPERDAY OTHEREGGSTYPE ATEANYFISH FRIEDFISH2FREQ FRIEDFISH2QUAN TUNA2FREQ TUNA2QUAN SALMONFREQ SALMONQUAN HALIBUTFREQ HALIBUTQUAN TROUTFREQ TROUTQUAN MACKERELFREQ MACKERELQUAN HERRINGFREQ HERRINGQUAN SARDINESFREQ SARDINESQUAN OTHERWHITEFISHFREQ OTHERWHITEFISHQUAN
1 NA NA 1 NA NA NA NA NA NA 1236.28 38.06 43.17 183.70 497.60 771.04 10.74 1754.18 1728.82 29.94 17.51 1.05 1.34 11.83 105.74 13.09 16.43 9.96 236.49 13.53 4.29 153.72 5.43 6.53 2.50 1.51 203.68 468.00 326.82 58.74 1539.07 247.27 1762.05 2712.87 125.77 2.66 94.51 90.16 1.01 56.13 97.01 1.070 0.418 2.32 0.506 0.787 0.541 367.53 54.44 92.65 1983.86 8.88 0.737 0.00248 0.0876 0.01600 0.00305 0.0371 8.97 0.796 28.75 6.06 2.45 0.2620 29.51 24.96 225.79 36.98 6.46 23.51 147.31 57.75 11.17 0.953 9.07 1.500e-04 65 7.07 777.05 31.43 12.31 59.44 7.57 0.00 31.43 12.31 59.44 1.440 5.29 6.98 73.96 27.41 0.720 2.870 4.80 1.18 0.761 1.66 0.3080 1515 85 200 5 27 40 11 0 1.4 1.9 2.6 600 1 60 1.4 0 18 0 0 9.12 0.000 13.15 20.73 0.333 0.316 0.878 0.2170 0.758 1.600 2.340 1.470 0.868 0.851 2.36 3.94 1.590 0.025800 0.767 0.0145 0.0943 0.244 0.605 1.03 0.66500 0.003750 0.0679 0.01140 0.00768 0.154000 0.1870 0.1990 0.027700 0.0957 0.672 2.010 0.440 0.148000 0.00707 0.026600 0.1840 0.283 4.06 1.740 1.05 0.46000 0.892 0.761 1.210 2 1 7 2 4 1 4 4 4 2 7 3 7 4 7 4 4 4 3 7 1 4 2 2 2 1 2 2 2 2 2 2 3 2 2 4 4 7 3 3 2 1 2 2 1 2 2 4 3 1 2 3 3 1 2 3 2 4 2 3 1 4 4 4 1 4 3 1 2 1 2 4 2 1 3 1 3 1 3 4 4 4 2 4 3 2 2 2 2 1 2 1 1 1 3 1 3 2 3 2 3 2 3 3 2 3 2 1 2 3 1 2 1 2 1 2 1 3 1 2 2 1 1 2 1 2 1 2 1 2 2 2 2 2 1 2 6 1 3 2 1 2 1 1 4 2 4 2 3 2 7 1 1 1 4 2 4 2 4 1 3 2 3 2 6 4 5 1 7 1 1 1 4 1 2 2 4 2 3 1 2 4 1 2 1 2 1 2 4 2 4 2 1 1 1 2 1 2 7 2 7 2 2 2 2 3 1 1 4 3 2 1 1 1 1 2 1 1 9 4 1 1 1 1 4 4 1 1 1 1 2 7 1 2 2 2 2 4 1 1 2 2 2 2 2 3 3 1 2 3 3 3 3 2 1 2 0 0 0 0 0 0 1 0 0 0 M 1 M M M M M 1 M 4 1 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M M 3 2 2 2 3 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2
2 NA NA 1 NA NA NA NA NA NA 2396.83 68.37 111.94 286.85 625.03 1125.41 11.22 2746.08 1796.85 42.98 27.32 1.08 1.34 17.45 39.80 36.42 46.59 20.74 266.90 11.05 3.90 99.19 6.34 10.57 6.97 1.23 220.81 316.83 278.79 37.98 409.13 47.20 289.38 1412.01 130.08 3.72 40.34 37.46 1.20 86.85 174.16 7.480 2.150 3.77 1.070 1.440 0.654 320.32 50.04 138.01 3339.03 18.14 1.410 0.00264 0.1280 0.00920 0.00556 0.0238 18.27 1.450 47.92 9.35 2.15 0.0789 61.37 40.92 236.80 44.32 6.00 42.89 130.19 123.02 13.58 68.870 143.72 7.420e-05 55 5.80 665.56 42.03 11.41 47.87 44.76 0.00 42.03 11.41 47.87 0.335 2.65 5.64 868.60 327.64 0.916 0.319 5.02 2.79 0.522 4.85 0.0353 1515 185 200 5 92 40 61 0 1.4 1.9 2.6 1000 1 60 1.4 0 18 0 0 35.95 0.000 20.90 74.63 0.646 0.298 0.988 0.0218 0.123 0.258 0.378 0.208 0.169 0.108 5.15 5.40 0.252 0.030300 0.306 0.0195 0.1120 0.531 2.620 4.33 0.77300 0.013400 1.0300 0.03540 0.01180 0.000813 0.0911 0.4800 0.006450 0.0640 0.667 0.319 0.283 0.000813 0.00612 0.029500 0.4520 0.210 5.28 0.562 4.36 0.56400 0.338 0.956 0.330 4 1 4 3 4 2 4 3 4 3 2 3 4 4 4 2 2 3 2 4 2 2 2 2 2 2 2 1 2 2 2 2 1 2 1 2 2 2 2 4 3 1 2 1 2 2 1 1 2 1 2 1 2 2 1 7 3 2 3 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 3 1 3 1 3 3 3 4 3 1 2 6 3 1 2 1 2 1 1 1 6 3 4 2 4 2 1 2 4 3 6 3 2 2 4 3 1 2 1 2 2 2 1 3 1 2 7 2 1 2 1 2 1 2 3 2 1 2 2 2 1 2 4 2 4 2 1 2 1 1 2 2 2 2 4 3 1 1 1 1 2 2 2 2 2 2 1 2 2 2 7 3 4 2 4 2 1 1 1 1 7 2 7 3 5 3 3 3 1 2 2 2 3 2 8 4 1 1 1 1 1 2 1 2 3 2 4 2 4 2 4 3 6 2 4 3 9 2 1 1 1 2 1 1 9 4 1 1 1 1 4 4 1 1 1 1 1 1 5 2 2 2 2 2 1 2 2 2 2 2 3 3 3 3 2 3 3 3 3 2 1 2 0 0 0 0 0 0 0 0 0 1 M M M M M M M 1 1 4 1 1 M 1 M 1 M 1 M 4 1 1 M 4 1 1 M 1 M 4 1 4 1 1 M 1 M 1 M 1 M M 4 1 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2
3 NA NA 1 NA NA NA NA NA NA 3195.49 121.19 153.43 334.52 1398.52 2165.03 23.13 5679.46 3652.43 63.13 37.69 2.41 3.43 32.72 104.63 49.50 60.98 31.59 491.79 20.75 7.17 244.03 15.15 18.24 10.91 2.90 383.39 1086.41 907.71 224.09 1968.79 147.50 2027.03 9433.25 317.49 10.04 403.63 129.25 1.58 160.82 136.47 4.750 1.740 3.27 1.510 2.620 1.550 783.77 54.88 172.20 6017.81 27.25 2.950 0.00323 0.2010 0.02600 0.00995 0.0670 27.45 3.050 25.32 32.54 4.53 0.3090 37.58 27.85 490.77 102.77 20.01 80.42 257.12 212.84 28.52 4.550 19.20 1.177e+01 69 10.77 1171.41 43.21 15.17 41.87 8.46 1.16 43.72 15.35 42.37 1.340 5.66 13.25 398.42 143.61 1.550 1.150 12.53 5.03 2.670 4.44 0.8930 0 0 0 0 0 0 0 0 0.0 0.0 0.0 0 0 0 0.0 0 0 0 0 15.83 0.808 34.31 92.91 0.575 2.510 3.100 0.0000 0.403 0.744 1.150 0.910 0.239 0.151 8.74 10.61 1.870 0.061700 0.885 0.2480 0.9130 3.250 2.370 7.77 0.44100 0.014500 0.9480 0.02690 0.06390 0.194000 0.2460 0.5530 0.125000 0.4520 1.640 0.916 0.932 0.192000 0.04030 0.056200 0.5150 0.688 10.60 2.530 7.95 0.33600 0.967 3.030 4.180 6 1 6 2 7 2 4 3 6 3 7 3 7 4 8 1 3 1 3 4 2 8 2 1 2 2 2 1 2 4 3 2 2 6 2 5 3 4 3 4 3 6 2 4 2 7 2 1 2 2 1 4 3 2 2 7 2 4 2 1 2 4 3 1 2 5 3 4 2 2 2 4 2 2 3 2 3 1 3 4 3 5 2 7 3 4 3 2 3 1 2 1 1 1 4 1 8 2 5 2 4 3 6 2 6 3 2 2 1 2 1 2 1 2 2 2 1 3 4 3 6 2 1 2 4 3 1 2 4 3 4 2 4 3 4 2 7 3 5 2 4 2 1 1 4 3 6 2 4 3 4 2 4 2 1 2 4 2 6 2 6 2 6 2 9 3 6 2 5 2 1 1 4 2 4 2 2 2 2 1 2 3 1 2 2 2 4 2 5 2 5 2 9 2 1 2 4 2 4 2 4 2 4 2 4 2 1 1 7 3 4 2 1 1 1 2 4 3 9 2 1 1 1 1 4 4 1 1 1 1 3 5 6 2 2 2 2 4 1 1 2 1 2 2 2 3 2 1 2 3 2 2 2 1 2 2 0 0 1 0 0 0 1 0 0 0 M M M M M M M 1 1 M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M 1 M M 1 1 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2
4 NA NA 1 NA NA NA NA NA NA 2374.05 61.73 73.84 385.21 952.67 1210.01 14.11 2539.16 2609.20 32.88 18.66 1.66 2.10 18.16 171.26 26.85 27.51 14.37 209.16 24.83 7.72 214.55 8.27 8.65 2.12 2.00 310.63 899.72 562.35 83.56 3875.43 354.89 627.65 4632.37 153.28 3.09 170.80 43.22 1.49 81.72 207.60 3.210 2.070 21.26 0.776 1.170 0.711 475.13 56.80 204.69 2134.28 12.53 0.992 0.00141 0.0840 0.00582 0.00164 0.0119 12.61 1.010 39.68 15.81 8.86 0.1340 139.92 35.68 241.97 71.14 10.47 45.70 104.36 227.86 8.87 116.860 103.99 1.270e-03 31 9.08 780.32 27.99 10.40 64.90 39.90 0.00 27.99 10.40 64.90 0.000 8.02 16.28 1330.00 331.08 0.758 2.700 6.79 1.14 1.140 6.02 0.0000 0 0 0 0 0 0 0 0 0.0 0.0 0.0 0 0 0 0.0 0 0 0 0 33.83 0.000 11.61 44.92 0.281 1.090 1.390 0.0000 1.050 1.900 2.930 2.030 0.899 0.837 7.83 9.46 1.640 0.000645 0.452 0.0265 0.0258 0.300 0.464 1.15 0.31200 0.000000 0.3300 0.06580 0.26100 0.000374 0.0260 0.1510 0.000884 0.1600 0.581 2.090 0.357 0.000374 0.21300 0.000781 0.1460 0.144 9.72 2.150 1.24 0.28600 0.544 1.310 0.199 7 1 3 1 5 1 1 1 7 2 1 3 7 4 6 1 3 1 3 1 1 6 2 7 3 7 3 1 2 7 2 1 2 7 1 3 4 4 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 7 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3 1 3 1 3 1 3 6 1 1 2 3 2 1 2 1 2 1 1 1 1 1 1 1 1 2 1 2 1 2 1 2 1 2 5 1 1 2 1 2 1 2 1 3 1 2 5 2 1 2 2 3 1 2 1 2 1 2 1 2 2 2 6 2 1 1 7 2 1 1 1 2 7 2 2 2 6 2 7 2 1 2 1 2 1 2 1 2 3 2 9 2 1 2 1 1 1 1 7 2 3 2 2 2 9 4 3 3 1 2 1 2 1 2 7 2 6 3 7 2 1 2 5 2 6 2 6 3 1 2 1 2 9 3 9 2 1 1 1 1 1 2 1 1 9 4 1 1 1 1 4 4 1 1 1 1 1 7 1 2 2 2 2 2 1 2 2 2 2 2 3 3 1 3 2 2 3 3 3 2 2 2 0 0 0 1 0 0 0 0 0 0 M 1 M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M M 1 M M 2 1 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2 M 2
5 NA NA 1 NA NA NA NA NA NA 1965.05 47.03 34.53 385.79 749.59 1019.08 15.62 2044.02 3977.15 69.15 49.24 1.50 1.69 12.26 457.86 11.56 12.23 6.61 222.03 21.12 6.71 568.66 8.53 6.67 2.01 2.04 387.32 1412.56 280.63 123.72 13149.44 755.76 19834.62 4700.64 50.68 2.26 79.12 887.52 1.51 59.65 300.38 0.439 0.244 11.10 0.718 0.978 0.716 654.82 48.36 176.37 2750.03 5.11 0.946 0.00130 0.0840 0.00936 0.00257 0.0219 5.19 0.981 131.35 6.66 1.26 0.1450 38.92 97.96 304.64 69.69 15.70 40.95 170.32 919.27 8.50 72.300 3.79 0.000e+00 50 8.33 1107.19 15.81 9.57 78.53 29.42 0.00 15.81 9.57 78.53 0.937 16.94 3.77 1341.37 569.92 4.910 5.000 2.65 1.52 0.498 1.79 0.0486 1515 85 200 5 27 40 11 0 1.4 1.9 2.6 600 1 60 1.4 0 18 0 0 33.44 0.000 2.37 20.99 0.183 0.537 0.787 0.0494 3.700 3.070 6.670 2.670 4.000 3.800 1.84 3.09 1.250 0.009700 0.639 0.3850 0.3800 0.205 0.585 1.73 0.00544 0.000297 0.1680 0.00148 0.00718 1.670000 0.3720 0.0545 0.225000 0.0768 2.400 5.100 2.340 1.660000 0.01080 0.005570 0.0359 0.666 3.00 1.190 1.80 0.00263 0.803 0.705 0.358 7 1 6 1 2 1 3 2 4 2 8 3 5 2 8 5 1 3 2 1 1 9 2 9 2 5 2 1 2 5 2 9 2 9 3 9 3 9 2 1 2 8 3 1 2 8 2 1 2 9 3 1 2 1 2 2 1 2 1 1 2 8 3 1 2 3 2 1 2 2 1 1 2 1 3 5 3 1 3 2 2 2 1 3 3 3 2 2 2 1 2 1 1 1 3 1 2 1 1 2 4 2 2 1 2 1 1 2 3 3 1 2 1 2 1 2 1 3 1 2 3 1 3 2 1 2 1 2 2 1 1 2 1 2 7 1 1 1 2 1 1 2 1 1 2 1 3 1 3 2 1 1 1 1 1 2 1 2 2 1 1 2 1 2 3 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 3 2 1 2 1 2 1 2 2 1 1 1 2 3 1 2 1 2 9 3 9 3 7 3 1 2 1 1 2 1 9 4 1 1 1 2 1 1 8 4 1 1 5 1 4 4 1 1 2 1 6 8 1 1 2 2 2 4 1 1 1 2 1 2 3 3 3 1 2 3 3 3 3 2 1 2 0 0 0 0 0 1 0 0 0 0 M 1 M M M M M M M 4 1 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M 1 M M 3 2 2 1 1 2 2 1 1 2 1 2 1 2 1 2 1 2 2 1

Your own dietary assessment tool data format:

#Use the example data
data("HEI2020_VALIDATION")
knitr::kable(head(HEI2020_VALIDATION))
id gender age kcal total_fruit whole_fruit total_vegetable green_and_bean total_protein seafood_plant_protein whole_grain dairy fatty_acid refined_grain sodium added_sugar saturated_fat EXP_HEI2020_ALL EXP_HEI2020_TOTALFRT EXP_HEI2020_FRT EXP_HEI2020_VEG EXP_HEI2020_GREENNBEAN EXP_HEI2020_TOTALPRO EXP_HEI2020_SEAPLANTPRO EXP_HEI2020_WHOLEGRAIN EXP_HEI2020_DAIRY EXP_HEI2020_FATTYACID EXP_HEI2020_REFINEDGRAIN EXP_HEI2020_SODIUM EXP_HEI2020_ADDEDSUGAR EXP_HEI2020_SATFAT
1 2 18 1000 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.20 1.80 1.10 6.50 8.0 40 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 10 10 10 10
2 2 18 1000 0.08 0.04 0.11 0.02 0.25 0.08 0.15 0.13 1.33 2.05 1.19 8.45 8.8 42 0.5 0.5 0.5 0.5 0.5 0.5 1 1 1 9 9 9 9
3 2 18 1000 0.16 0.08 0.22 0.04 0.50 0.16 0.30 0.26 1.46 2.30 1.28 10.40 9.6 44 1.0 1.0 1.0 1.0 1.0 1.0 2 2 2 8 8 8 8
4 2 18 1000 0.24 0.12 0.33 0.06 0.75 0.24 0.45 0.39 1.59 2.55 1.37 12.35 10.4 46 1.5 1.5 1.5 1.5 1.5 1.5 3 3 3 7 7 7 7
5 2 18 1000 0.32 0.16 0.44 0.08 1.00 0.32 0.60 0.52 1.72 2.80 1.46 14.30 11.2 48 2.0 2.0 2.0 2.0 2.0 2.0 4 4 4 6 6 6 6
6 2 18 1000 0.40 0.20 0.55 0.10 1.25 0.40 0.75 0.65 1.85 3.05 1.55 16.25 12.0 50 2.5 2.5 2.5 2.5 2.5 2.5 5 5 5 5 5 5 5

Examples for using dietaryindex’s functions:

Remember, when using dietaryindex’s functions for NHANES, the complex survey design has to be taken into account! See the examples below. ___

Calculating HEI2020 for NHANES_FPED (after 2005)

# Using the first day nutrition data
FPED_PATH_1 = "/Users/james/Desktop/fped_dr1tot_1718.sas7bdat"
NUTRIENT_PATH_1 = "/Users/james/Desktop/DR1TOT_J.XPT"
DEMO_PATH_1 = "/Users/james/Desktop/DEMO_J.XPT"

HEI2020_NHANES_FPED(FPED_PATH=FPED_PATH_1, NUTRIENT_PATH=NUTRIENT_PATH_1, DEMO_PATH=DEMO_PATH_1)
# only the first day nutrition data
# Use the NHANES example data in 2017-2018 using only the first day nutrition data
HEI2020_NHANES_FPED_unweighted_d1 = HEI2020_NHANES_FPED(FPED_PATH=NHANES_20172018$FPED, NUTRIENT_PATH=NHANES_20172018$NUTRIENT, DEMO_PATH=NHANES_20172018$DEMO)

# set up survey design for NHANES data 2017-2018 day 1
NHANES_20172018_design_d1 = NHANES_20172018$FPED %>%
    filter(!is.na(WTDRD1)) %>%
    ## select the variables needed for the survey design
    select(SEQN, SDMVPSU, SDMVSTRA, WTDRD1)

# Merge the NHANES data with weighting variables with the HEI2020 results
NHANES_20172018_design_d1_HEI2020 = inner_join(HEI2020_NHANES_FPED_unweighted_d1, NHANES_20172018_design_d1, by = "SEQN")
print(NHANES_20172018_design_d1_HEI2020)
## # A tibble: 7,285 × 19
##     SEQN RIDAGEYR HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT HEI2020_VEG
##    <dbl>    <dbl>       <dbl>            <dbl>       <dbl>       <dbl>
##  1 93704        2        63.5            5           0          3.03  
##  2 93705       66        41.1            0           0          5     
##  3 93706       18        44.5            0           0          1.65  
##  4 93707       13        41.6            0           0          2.41  
##  5 93708       66        58.5            2.45        4.90       5     
##  6 93711       56        67.1            2.13        3.12       5     
##  7 93712       18        69.5            5           5          3.49  
##  8 93713       67        52.9            4.69        5          4.57  
##  9 93714       54        38.6            0.376       0.702      0.638 
## 10 93715       71        40.0            1.55        3.11       0.0706
## # ℹ 7,275 more rows
## # ℹ 13 more variables: HEI2020_GREENNBEAN <dbl>, HEI2020_TOTALPRO <dbl>,
## #   HEI2020_SEAPLANTPRO <dbl>, HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>,
## #   HEI2020_FATTYACID <dbl>, HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>,
## #   HEI2020_ADDEDSUGAR <dbl>, HEI2020_SATFAT <dbl>, SDMVPSU <dbl>,
## #   SDMVSTRA <dbl>, WTDRD1 <dbl>
# set up survey design for NHANES data 2017-2018 day 1
NHANES_design_1718_d1 <- svydesign(
    ## Masked variance pseudo-PSU
    id = ~SDMVPSU, 
    ## Masked variance pseudo-stratum
    strata = ~SDMVSTRA, 
    ## Dietary day one sample weight
    weight = ~WTDRD1, 
    data = NHANES_20172018_design_d1_HEI2020, 
    nest = TRUE) 

# summarize the weighted results
tbl_svysummary(
    data=NHANES_design_1718_d1,
    statistic = list(all_categorical() ~ "{n_unweighted} ({p}%)", all_continuous() ~ "{mean} ({mean.std.error})")
    )
Characteristic N = 316,291,3031
Respondent sequence number 98,305 (46)
Age in years at screening 39 (1)
HEI2020_ALL 49 (1)
HEI2020_TOTALFRT 2.01 (0.07)
HEI2020_FRT 2.08 (0.09)
HEI2020_VEG 2.77 (0.05)
HEI2020_GREENNBEAN 1.41 (0.06)
HEI2020_TOTALPRO 4.07 (0.04)
HEI2020_SEAPLANTPRO 2.20 (0.05)
HEI2020_WHOLEGRAIN 2.4 (0.1)
HEI2020_DAIRY 5.1 (0.1)
HEI2020_FATTYACID 4.7 (0.1)
HEI2020_REFINEDGRAIN 5.8 (0.1)
HEI2020_SODIUM 4.7 (0.1)
    Unknown 69,264
HEI2020_ADDEDSUGAR 6.7 (0.1)
HEI2020_SATFAT 5.3 (0.1)
    Unknown 69,264
Masked variance pseudo-PSU
    1 3,538 (49%)
    2 3,747 (51%)
Masked variance pseudo-stratum 140.9 (0.2)
Dietary day one sample weight 112,330 (6,644)
1 Mean (SE); n (unweighted) (%)
##################################################
# first day + second day nutrition data
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
HEI2020_NHANES_FPED_unweighted_d1d2 = HEI2020_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)

# set up survey design for NHANES data 2017-2018 day 1 and day 2
## filter out the missing values for the weight variable WTDR2D
NHANES_20172018_design_d1d2 = NHANES_20172018$FPED %>%
    filter(!is.na(WTDR2D)) %>%
    ## select the variables needed for the survey design
    select(SEQN, SDMVPSU, SDMVSTRA, WTDR2D)

# Merge the NHANES data with weighting variables with the HEI2020 results
NHANES_20172018_design_d1d2_HEI2020 = inner_join(HEI2020_NHANES_FPED_unweighted_d1d2, NHANES_20172018_design_d1d2, by = "SEQN")
print(NHANES_20172018_design_d1d2_HEI2020)
## # A tibble: 6,318 × 19
##     SEQN RIDAGEYR HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT HEI2020_VEG
##    <dbl>    <dbl>       <dbl>            <dbl>       <dbl>       <dbl>
##  1 93704        2        61.7           5            2.5         1.55 
##  2 93705       66        43.0           0.0759       0           3.46 
##  3 93707       13        38.9           0            0           2.09 
##  4 93708       66        49.9           1.22         2.45        3.20 
##  5 93711       56        69.0           3.57         2.85        3.75 
##  6 93712       18        46.4           2.5          2.5         2.42 
##  7 93713       67        55.4           4.84         5           3.47 
##  8 93714       54        36.1           0.321        0.617       1.85 
##  9 93715       71        30.7           0.777        1.55        0.614
## 10 93716       61        65.0           5            5           4.03 
## # ℹ 6,308 more rows
## # ℹ 13 more variables: HEI2020_GREENNBEAN <dbl>, HEI2020_TOTALPRO <dbl>,
## #   HEI2020_SEAPLANTPRO <dbl>, HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>,
## #   HEI2020_FATTYACID <dbl>, HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>,
## #   HEI2020_ADDEDSUGAR <dbl>, HEI2020_SATFAT <dbl>, SDMVPSU <dbl>,
## #   SDMVSTRA <dbl>, WTDR2D <dbl>
# calculate the weighted results using the survey design
NHANES_design_1718_d1d2 <- svydesign(
    ## Masked variance pseudo-PSU
    id = ~SDMVPSU, 
    ## Masked variance pseudo-stratum
    strata = ~SDMVSTRA, 
    ## Dietary two-day sample weight
    weight = ~WTDR2D, 
    data = NHANES_20172018_design_d1d2_HEI2020,  
    nest = TRUE)

# summarize the weighted results
tbl_svysummary(
    data=NHANES_design_1718_d1d2,
    statistic = list(all_categorical() ~ "{n_unweighted} ({p}%)", all_continuous() ~ "{mean} ({mean.std.error})")
    )
Characteristic N = 316,221,0261
Respondent sequence number 98,306 (64)
Age in years at screening 39 (1)
HEI2020_ALL 50 (1)
HEI2020_TOTALFRT 2.10 (0.08)
HEI2020_FRT 2.12 (0.09)
HEI2020_VEG 2.78 (0.05)
HEI2020_GREENNBEAN 1.42 (0.06)
HEI2020_TOTALPRO 4.09 (0.03)
HEI2020_SEAPLANTPRO 2.19 (0.06)
HEI2020_WHOLEGRAIN 2.60 (0.11)
HEI2020_DAIRY 5.15 (0.07)
HEI2020_FATTYACID 4.72 (0.08)
HEI2020_REFINEDGRAIN 5.89 (0.06)
HEI2020_SODIUM 4.61 (0.07)
    Unknown 73,081
HEI2020_ADDEDSUGAR 6.92 (0.10)
HEI2020_SATFAT 5.31 (0.08)
    Unknown 138,954
Masked variance pseudo-PSU
    1 3,126 (50%)
    2 3,192 (50%)
Masked variance pseudo-stratum 141.0 (0.2)
Dietary two-day sample weight 141,541 (9,366)
1 Mean (SE); n (unweighted) (%)
# the sequence of DEMO, FPED, NUTRIENT data entry do not matter if you use "DEMO_PATH", "FPED_PATH2", "NUTRIENT_PATH2" to specify the data input

Calculating HEI2020 for NHANES_MPED (before 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
# Use the NHANES example data in 2003-2004 using the first day + second day nutrition data
data("NHANES_20032004")
HEI2020_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)
## # A tibble: 7,918 × 17
##     SEQN TOTALKCAL_HEI2020 RIDAGEYR HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT
##    <dbl>             <dbl>    <dbl>       <dbl>            <dbl>       <dbl>
##  1 21005             2598.       19        39.0            0.489       0    
##  2 21006             1198        16        37.8            0.738       0    
##  3 21007              943        14        43.0            3.97        1.03 
##  4 21008             2236.       17        28.4            0           0    
##  5 21009             4540.       55        43.4            0.182       0.311
##  6 21010             1834.       52        53.7            0.406       0.812
##  7 21012             2786        63        37.5            0           0    
##  8 21013             1420.       13        44.6            2.44        2.5  
##  9 21014             2079         3        49.0            2.5         0.880
## 10 21015             1638.       83        66.8            3.37        4.87 
## # ℹ 7,908 more rows
## # ℹ 11 more variables: HEI2020_VEG <dbl>, HEI2020_GREENNBEAN <dbl>,
## #   HEI2020_TOTALPRO <dbl>, HEI2020_SEAPLANTPRO <dbl>,
## #   HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>, HEI2020_FATTYACID <dbl>,
## #   HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>, HEI2020_ADDEDSUGAR <dbl>,
## #   HEI2020_SATFAT <dbl>

Calculating HEI2015 for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
# Using the first day nutrition data
FPED_PATH_1 = "/Users/james/Desktop/fped_dr1tot_1718.sas7bdat"
NUTRIENT_PATH_1 = "/Users/james/Desktop/DR1TOT_J.XPT"
DEMO_PATH_1 = "/Users/james/Desktop/DEMO_J.XPT"

HEI2015_NHANES_FPED(FPED_PATH=FPED_PATH_1, NUTRIENT_PATH=NUTRIENT_PATH_1, DEMO_PATH=DEMO_PATH_1)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
data("NHANES_20172018")
HEI2015_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)
## # A tibble: 6,177 × 15
##     SEQN HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT HEI2015_VEG HEI2015_GREENNBEAN
##    <dbl>       <dbl>            <dbl>       <dbl>       <dbl>              <dbl>
##  1 93704        61.7           5            2.5         1.55                0   
##  2 93705        43.0           0.0759       0           3.46                4.83
##  3 93707        38.9           0            0           2.09                0   
##  4 93708        49.9           1.22         2.45        3.20                0   
##  5 93711        69.0           3.57         2.85        3.75                4.27
##  6 93712        46.4           2.5          2.5         2.42                2.5 
##  7 93713        55.4           4.84         5           3.47                1.13
##  8 93714        36.1           0.321        0.617       1.85                0   
##  9 93715        30.7           0.777        1.55        0.614               0   
## 10 93716        65.0           5            5           4.03                4.73
## # ℹ 6,167 more rows
## # ℹ 9 more variables: HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>

Calculating HEI2015 for NHANES_MPED (betweeen 1999-2004)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
data("NHANES_20032004")
HEI2015_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)
## # A tibble: 7,650 × 16
##     SEQN TOTALKCAL_HEI2015 HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT HEI2015_VEG
##    <dbl>             <dbl>       <dbl>            <dbl>       <dbl>       <dbl>
##  1 21005             2598.        53.7            0.489       0            2.28
##  2 21006             1198         46.3            0.738       0            3.95
##  3 21007              943         42.5            3.97        1.03         3.15
##  4 21008             2236.        45.8            0           0            2.37
##  5 21009             4540.        59.3            0.182       0.311        3.01
##  6 21010             1834.        59.4            0.406       0.812        4.10
##  7 21012             2786         54.0            0           0            2.89
##  8 21013             1420.        50.6            2.44        2.5          2.52
##  9 21014             2079         63.4            2.5         0.880        4.25
## 10 21015             1638.        73.7            3.37        4.87         3.42
## # ℹ 7,640 more rows
## # ℹ 10 more variables: HEI2015_GREENNBEAN <dbl>, HEI2015_TOTALPRO <dbl>,
## #   HEI2015_SEAPLANTPRO <dbl>, HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>,
## #   HEI2015_FATTYACID <dbl>, HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>,
## #   HEI2015_ADDEDSUGAR <dbl>, HEI2015_SATFAT <dbl>

Calculating AHEI for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
FPED_IND_PATH = "/Users/james/Desktop/data/fped_dr1iff.sas7bdat"
NUTRIENT_IND_PATH = "/Users/james/Desktop/data/DR1IFF_J"

AHEI_NHANES_FPED(FPED_IND_PATH, NUTRIENT_IND_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
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>

Calculating AHEI for NHANES_MPED (1999-2004)

# Use the NHANES example data in 2003-2004 using the first day + second day nutrition data
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>

Calculating aMED for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
FPED_PATH = "/Users/james/Desktop/fped_dr1tot_1718.sas7bdat"
NUTRIENT_PATH = "/Users/james/Desktop/DR1TOT_J.XPT"
DEMO_PATH = "/Users/james/Desktop/DEMO_J.XPT"

MED_NHANES_FPED(FPED_PATH, NUTRIENT_PATH, DEMO_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
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>

Calculating aMED for NHANES_MPED (1999-2004)

# Use the NHANES example data in 2003-2004 using the first day + second day nutrition data
data("NHANES_20032004")
MED_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)
## 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: 7,647 × 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 21005     2          2       0       0.5        0.5         0        0.5
##  2 21006     3.5        3.5     0       0          0.5         0.5      0.5
##  3 21007     2.5        2.5     0       0.5        0           0        0  
##  4 21008     3.5        3.5     0       1          0.5         1        0  
##  5 21009     4          4       0       0.5        0.5         0.5      0  
##  6 21010     2          1.5     0       0          0           1        0  
##  7 21012     3          3       0       0.5        0.5         1        0  
##  8 21013     2.5        2.5     0       0          0           0.5      0.5
##  9 21014     5          5       0.5     1          0.5         1        0.5
## 10 21015     4.5        4.5     0.5     0.5        1           1        0.5
## # ℹ 7,637 more rows
## # ℹ 4 more variables: MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
## #   MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>

Calculating MEDI for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
FPED_IND_PATH = "/Users/james/Desktop/data/fped_dr1iff.sas7bdat"
NUTRIENT_IND_PATH = "/Users/james/Desktop/data/DR1IFF_J"

MEDI_NHANES_FPED(FPED_IND_PATH, NUTRIENT_IND_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
data("NHANES_20172018")
MEDI_NHANES_FPED(FPED_IND_PATH=NHANES_20172018$FPED_IND, NUTRIENT_IND_PATH=NHANES_20172018$NUTRIENT_IND, FPED_IND_PATH2=NHANES_20172018$FPED_IND2, NUTRIENT_IND_PATH2=NHANES_20172018$NUTRIENT_IND2)
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## Since no SWEETS code is provided, the default SSB code from 17-18 FNDDS file is used
## Since no FAT_OIL code is provided, the default FAT_OIL code from 17-18 FNDDS file is used
## Since no OLIVE_OIL code is provided, the default OLIVE_OIL code from 17-18 FNDDS file is used
## # A tibble: 6,490 × 14
##     SEQN MEDI_ALL MEDI_NOETOH MEDI_OLIVE_OIL MEDI_FRT MEDI_VEG MEDI_LEGUMES
##    <dbl>    <dbl>       <dbl>          <dbl>    <dbl>    <dbl>        <dbl>
##  1 93704      3           3                0        0      0            0  
##  2 93705      3.5         3.5              0        0      0            1  
##  3 93707      2           2                0        0      0            0  
##  4 93708      3.5         3.5              0        0      0.5          0  
##  5 93710      3           3                0        0      0            0  
##  6 93711      5           4.5              0        0      0.5          1  
##  7 93712      3           3                0        0      0            0.5
##  8 93713      2.5         2.5              0        0      0.5          0  
##  9 93714      3           3                0        0      0            0  
## 10 93715      3           3                0        0      0            0  
## # ℹ 6,480 more rows
## # ℹ 7 more variables: MEDI_NUTS <dbl>, MEDI_FISH <dbl>, MEDI_ALCOHOL <dbl>,
## #   MEDI_SSB <dbl>, MEDI_SWEETS <dbl>, MEDI_DISCRET_FAT <dbl>,
## #   MEDI_REDPROC_MEAT <dbl>

Calculating MEDI for NHANES_MPED (1999-2004)

# Use the NHANES example data in 2003-2004 using the first day + second day nutrition data
data("NHANES_20032004")
MEDI_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)
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## Since no SWEETS code is provided, the default SSB code from 17-18 FNDDS file is used
## Since no FAT_OIL code is provided, the default FAT_OIL code from 17-18 FNDDS file is used
## Since no OLIVE_OIL code is provided, the default OLIVE_OIL code from 17-18 FNDDS file is used
## # A tibble: 7,650 × 14
##     SEQN MEDI_ALL MEDI_NOETOH MEDI_OLIVE_OIL MEDI_FRT MEDI_VEG MEDI_LEGUMES
##    <dbl>    <dbl>       <dbl>          <dbl>    <dbl>    <dbl>        <dbl>
##  1 21005      1.5         1.5              0        0        0          0  
##  2 21006      3.5         3.5              0        0        0          0  
##  3 21007      2           2                0        0        0          0  
##  4 21008      2.5         2.5              0        0        0          0  
##  5 21009      2.5         2.5              0        0        0          0  
##  6 21010      4           3                0        0        0          0.5
##  7 21012      2.5         1.5              0        0        0          0.5
##  8 21013      1.5         1.5              0        0        0          0  
##  9 21014      4           4                0        0        0          0.5
## 10 21015      3           3                0        0        0          0  
## # ℹ 7,640 more rows
## # ℹ 7 more variables: MEDI_NUTS <dbl>, MEDI_FISH <dbl>, MEDI_ALCOHOL <dbl>,
## #   MEDI_SSB <dbl>, MEDI_SWEETS <dbl>, MEDI_DISCRET_FAT <dbl>,
## #   MEDI_REDPROC_MEAT <dbl>

Calculating DASH for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
FPED_IND_PATH = "/Users/james/Desktop/data/fped_dr1iff.sas7bdat"
NUTRIENT_IND_PATH = "/Users/james/Desktop/data/DR1IFF_J"

DASH_NHANES_FPED(FPED_IND_PATH, NUTRIENT_IND_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
data("NHANES_20172018")
DASH_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.
## Since no skim milk code is provided, the default skim milk code from 17-18 FNDDS file is used.
## Since no low-fat cheese code is provided, the default low-fat cheese code from 17-18 FNDDS file is used.
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 6,490 × 10
##     SEQN DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN DASH_LOWF_DAIRY
##    <dbl>    <dbl>    <dbl>    <dbl>        <dbl>       <dbl>           <dbl>
##  1 93704     23.5      4.5      1            1           2.5               1
##  2 93705     18.5      1.5      3            4           1                 1
##  3 93707     20        1        2            2           4.5               1
##  4 93708     23        2        3.5          3           2                 1
##  5 93710     25.5      3.5      1.5          2.5         3.5               1
##  6 93711     31        4.5      4.5          5           3                 5
##  7 93712     18        3        3.5          3           3                 1
##  8 93713     24.5      4.5      4.5          2.5         2.5               1
##  9 93714     17.5      2.5      1            1           3                 3
## 10 93715     14.5      2        1.5          1           1                 1
## # ℹ 6,480 more rows
## # ℹ 3 more variables: DASH_SODIUM <dbl>, DASH_REDPROC_MEAT <dbl>,
## #   DASH_SSB_FRTJ <dbl>

Calculating DASH for NHANES_MPED (1999-2004)

# Use the NHANES example data in 1999-2004 using the first day + second day nutrition data
data("NHANES_20032004")
DASH_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)
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## Since no skim milk code is provided, the default skim milk code from 17-18 FNDDS file is used.
## Since no low-fat cheese code is provided, the default low-fat cheese code from 17-18 FNDDS file is used.
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 7,650 × 10
##     SEQN DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN DASH_LOWF_DAIRY
##    <dbl>    <dbl>    <dbl>    <dbl>        <dbl>       <dbl>           <dbl>
##  1 21005     15.5      2        2            2.5         3                 1
##  2 21006     18        2        2            2.5         2.5               1
##  3 21007     18        3        3            1           1                 1
##  4 21008     17.5      1        3.5          2.5         3                 1
##  5 21009     19.5      2        3            2           2                 1
##  6 21010     18        1.5      2            4           1                 1
##  7 21012     17.5      1        3            4           2.5               1
##  8 21013     16        2.5      2            2           1                 1
##  9 21014     25.5      3        4            4           2.5               1
## 10 21015     27.5      3        3            4           4.5               1
## # ℹ 7,640 more rows
## # ℹ 3 more variables: DASH_SODIUM <dbl>, DASH_REDPROC_MEAT <dbl>,
## #   DASH_SSB_FRTJ <dbl>

Calculating DASHI for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.
FPED_IND_PATH = "/Users/james/Desktop/data/fped_dr1iff.sas7bdat"
NUTRIENT_IND_PATH = "/Users/james/Desktop/data/DR1IFF_J"

DASHI_NHANES_FPED(FPED_IND_PATH, NUTRIENT_IND_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
data("NHANES_20172018")
DASHI_NHANES_FPED(NUTRIENT_PATH = NHANES_20172018$NUTRIENT, NUTRIENT_PATH2 = NHANES_20172018$NUTRIENT2)
## # A tibble: 6,491 × 11
##     SEQN DASHI_ALL DASHI_TOTAL_FAT DASHI_SAT_FAT DASHI_CHOLESTEROL DASHI_SODIUM
##    <dbl>     <dbl>           <dbl>         <dbl>             <dbl>        <dbl>
##  1 93704      4.72          0.768         0.840              0.680       0.5   
##  2 93705      2.49          0             0.472              0.5         0     
##  3 93707      1.15          0             0.0199             0           0.0844
##  4 93708      2.80          0             0.173              0.5         0     
##  5 93710      4.21          0.653         0.490              0.5         0.5   
##  6 93711      3.62          0.0920        0.490              0.312       0.5   
##  7 93712      3.89          0.844         0.640              0.629       0     
##  8 93713      3.79          0.5           0.428              0.889       0.772 
##  9 93714      1.68          0             0                  0           0     
## 10 93715      1.82          0             0.239              0.162       0.5   
## # ℹ 6,481 more rows
## # ℹ 5 more variables: DASHI_PROTEIN <dbl>, DASHI_FIBER <dbl>,
## #   DASHI_POTASSIUM <dbl>, DASHI_MAGNESIUM <dbl>, DASHI_CALCIUM <dbl>

Calculating DASHI for NHANES_FPED (1999-2004)

# Use the NHANES example data in 1999-2004 using the first day + second day nutrition data
data("NHANES_20032004")
DASHI_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)
## # A tibble: 7,650 × 11
##     SEQN DASHI_ALL DASHI_TOTAL_FAT DASHI_SAT_FAT DASHI_CHOLESTEROL DASHI_SODIUM
##    <dbl>     <dbl>           <dbl>         <dbl>             <dbl>        <dbl>
##  1 21005      2.28           0.321         0.585             0.550        0    
##  2 21006      2.53           0.591         0.577             0.5          0    
##  3 21007      2.97           0.5           0.546             0.5          0.300
##  4 21008      1.54           0.185         0.313             0.381        0    
##  5 21009      1.73           0             0.454             0.294        0.5  
##  6 21010      4.92           0.812         0.435             0.781        1    
##  7 21012      1.30           0.113         0.388             0            0    
##  8 21013      2.94           0.410         0.614             0.968        0.672
##  9 21014      5.17           0.725         0.373             0.742        0    
## 10 21015      4.84           0.373         0.394             0.661        0.677
## # ℹ 7,640 more rows
## # ℹ 5 more variables: DASHI_PROTEIN <dbl>, DASHI_FIBER <dbl>,
## #   DASHI_POTASSIUM <dbl>, DASHI_MAGNESIUM <dbl>, DASHI_CALCIUM <dbl>

Calculating DII for NHANES_FPED (after 2005)

Calculating dietary index is just the first step. Please include complex survey design when analzying NHANES data as shown above.

This function was improved by Zhe Xu () to include the other DII ingredients, including Garlic, Ginger, Onion, Pepper, Thyme/oregano, and other Flavonoids, in the calculation.

FPED_PATH = "/Users/james/Desktop/fped_dr1tot_1718.sas7bdat"
NUTRIENT_PATH = "/Users/james/Desktop/DR1TOT_J.XPT"
DEMO_PATH = "/Users/james/Desktop/DEMO_J.XPT"

DII_NHANES_FPED(FPED_PATH, NUTRIENT_PATH, DEMO_PATH)
# Use the NHANES example data in 2017-2018 using the first day + second day nutrition data
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>, …

Calculating DII for NHANES_MPED (1999-2004)

# Use the NHANES example data in 2003-2004 using the first day + second day nutrition data
data("NHANES_20032004")
data("DII_OTHER_INGREDIENTS_day1")
data("DII_OTHER_INGREDIENTS_day2")
DII_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, OTHER_INGREDIENTS1 = DII_OTHER_INGREDIENTS_day1, OTHER_INGREDIENTS2 = DII_OTHER_INGREDIENTS_day2)
## VITD is not included in the calculation in the first day of NHANES data.
## It is normal to see warnings if you do not provide all arguments using DII. The algorithm will only count the arguments you enter to calculate the DII. All warnings are about the first column you don't use. For example, if you only entered alcohol, vitamin b12, and vitamin b6, all warnings would remind you that bcarotene is not found.
## VITD is not included in the calculation in the first day of NHANES data.
## It is normal to see warnings if you do not provide all arguments using DII. The algorithm will only count the arguments you enter to calculate the DII. All warnings are about the first column you don't use. For example, if you only entered alcohol, vitamin b12, and vitamin b6, all warnings would remind you that bcarotene is not found.
## 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: 7,650 × 48
##     SEQN DII_ALL DII_NOETOH ALCOHOL_DII VITB12_DII VITB6_DII BCAROTENE_DII
##    <dbl>   <dbl>      <dbl>       <dbl>      <dbl>     <dbl>         <dbl>
##  1 21005    2.68      2.40        0.278    -0.0305   -0.107          0.555
##  2 21006    4.76      4.48        0.278    -0.0868    0.224          0.563
##  3 21007    4.82      4.54        0.278    -0.0904    0.277          0.540
##  4 21008    4.28      4.00        0.278    -0.0383    0.150          0.537
##  5 21009    1.21      0.937       0.278     0.0337   -0.293          0.528
##  6 21010    3.34      3.61       -0.274    -0.0499    0.0303         0.563
##  7 21012    3.23      3.51       -0.278     0.0360   -0.194          0.549
##  8 21013    4.57      4.29        0.278    -0.0565    0.150          0.559
##  9 21014    1.93      1.65        0.278     0.0706   -0.204          0.524
## 10 21015    2.39      2.11        0.278    -0.0551   -0.0627         0.134
## # ℹ 7,640 more rows
## # ℹ 41 more variables: CAFFEINE_DII <dbl>, CARB_DII <dbl>, CHOLES_DII <dbl>,
## #   KCAL_DII <dbl>, EUGENOL_DII <dbl>, TOTALFAT_DII <dbl>, FIBER_DII <dbl>,
## #   FOLICACID_DII <dbl>, GARLIC_DII <dbl>, GINGER_DII <dbl>, IRON_DII <dbl>,
## #   MG_DII <dbl>, MUFA_DII <dbl>, NIACIN_DII <dbl>, N3FAT_DII <dbl>,
## #   N6FAT_DII <dbl>, ONION_DII <dbl>, PROTEIN_DII <dbl>, PUFA_DII <dbl>,
## #   RIBOFLAVIN_DII <dbl>, SAFFRON_DII <dbl>, SATFAT_DII <dbl>, SE_DII <dbl>, …

Calculating HEI2020 for ASA24

DATA_PATH = "/Users/james/Desktop/data/Totals.csv"
# if you want to summarize all recalls into a result via average
HEI2020_ASA24(DATA_PATH, RECALL_SUMMARIZE = TRUE)
# if you want to use all individual recalls
HEI2020_ASA24(DATA_PATH, RECALL_SUMMARIZE = FALSE)
#Use the example data
data("ASA24_exp")
HEI2015_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## # A tibble: 21 × 17
## # Groups:   UserName, UserID [21]
##    UserName UserID            TOTALKCAL HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
##       <dbl> <chr>                 <dbl>       <dbl>            <dbl>       <dbl>
##  1        1 e6541891-8a22-49…     1514.        69.8             1.26        2.45
##  2        2 dbb278b0-b589-44…      935.        52.8             5           0   
##  3        3 f0115426-e6f8-4c…     1655.        51.2             5           5   
##  4        4 337d84a7-3bff-48…     1571.        47.5             0           0   
##  5        5 998f098a-8584-49…      907.        45.2             0           0   
##  6        6 aae330db-8f22-4d…     1271.        52.9             3.78        5   
##  7        7 76e0f3e1-8e17-49…     2662.        48.4             1.51        2.23
##  8        8 24de994f-e06a-41…     2039.        69.0             2.76        5   
##  9        9 8f61ae64-6a82-4f…     1469.        70.9             5           5   
## 10       10 b47ab1b8-e62b-4b…     1636.        61.2             2.64        0   
## # ℹ 11 more rows
## # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
## #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>
HEI2015_ASA24(ASA24_exp, RECALL_SUMMARIZE = FALSE)
## RECALL_SUMMARIZE is FALSE, skipping summarization step...
## # A tibble: 42 × 17
##    UserName UserID            TOTALKCAL HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
##       <dbl> <chr>                 <dbl>       <dbl>            <dbl>       <dbl>
##  1        1 e6541891-8a22-49…     2019.        69.8             1.26        2.45
##  2        1 e6541891-8a22-49…     1010.        69.8             1.26        2.45
##  3        2 dbb278b0-b589-44…     1247.        52.8             5           0   
##  4        2 dbb278b0-b589-44…      623.        52.8             5           0   
##  5        3 f0115426-e6f8-4c…     2206.        51.2             5           5   
##  6        3 f0115426-e6f8-4c…     1103.        51.2             5           5   
##  7        4 337d84a7-3bff-48…     2095.        47.5             0           0   
##  8        4 337d84a7-3bff-48…     1047.        47.5             0           0   
##  9        5 998f098a-8584-49…     1209.        45.2             0           0   
## 10        5 998f098a-8584-49…      605.        45.2             0           0   
## # ℹ 32 more rows
## # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
## #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>

Calculating HEI2020_toddlers for ASA24

DATA_PATH = "/Users/james/Desktop/data/Totals.csv"
# if you want to summarize all recalls into a result via average
HEI2020_TODDLERS_ASA24(DATA_PATH, RECALL_SUMMARIZE = TRUE)
# if you want to use all individual recalls
HEI2020_TODDLERS_ASA24(DATA_PATH, RECALL_SUMMARIZE = FALSE)
#Use the example data
data("ASA24_exp")
HEI2020_TODDLERS_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
## [1] "RECALL_SUMMARIZE = TRUE, summarizing HEI2020_TODDLERS for ASA24 data by averaging over all possible recalls per person per day..."
## [1] "The results should be only used for HEI-Toddlers 2020 (age 1-2 years), not for HEI-2020 (non-toddlers, age > 2 years)."
## # A tibble: 21 × 17
## # Groups:   UserName, UserID [21]
##    UserName UserID         TOTALKCAL HEI2020_TODDLERS_ALL HEI2020_TODDLERS_TOT…¹
##       <dbl> <chr>              <dbl>                <dbl>                  <dbl>
##  1        1 e6541891-8a22…     1514.                 60.8                   1.44
##  2        2 dbb278b0-b589…      935.                 55.2                   5   
##  3        3 f0115426-e6f8…     1655.                 47.8                   5   
##  4        4 337d84a7-3bff…     1571.                 50.7                   0   
##  5        5 998f098a-8584…      907.                 39.3                   0   
##  6        6 aae330db-8f22…     1271.                 46.9                   4.32
##  7        7 76e0f3e1-8e17…     2662.                 45.4                   1.73
##  8        8 24de994f-e06a…     2039.                 70.3                   3.16
##  9        9 8f61ae64-6a82…     1469.                 69.1                   5   
## 10       10 b47ab1b8-e62b…     1636.                 59.2                   3.01
## # ℹ 11 more rows
## # ℹ abbreviated name: ¹​HEI2020_TODDLERS_TOTALFRT
## # ℹ 12 more variables: HEI2020_TODDLERS_FRT <dbl>, HEI2020_TODDLERS_VEG <dbl>,
## #   HEI2020_TODDLERS_GREENNBEAN <dbl>, HEI2020_TODDLERS_TOTALPRO <dbl>,
## #   HEI2020_TODDLERS_SEAPLANTPRO <dbl>, HEI2020_TODDLERS_WHOLEGRAIN <dbl>,
## #   HEI2020_TODDLERS_DAIRY <dbl>, HEI2020_TODDLERS_FATTYACID <dbl>,
## #   HEI2020_TODDLERS_REFINEDGRAIN <dbl>, HEI2020_TODDLERS_SODIUM <dbl>, …
HEI2020_TODDLERS_ASA24(ASA24_exp, RECALL_SUMMARIZE = FALSE)
## [1] "RECALL_SUMMARIZE is FALSE, skipping summarization step..."
## [1] "The results should be only used for HEI-Toddlers 2020 (age 1-2 years), not for HEI-2020 (non-toddlers, age > 2 years)."
## # A tibble: 42 × 17
##    UserName UserID         TOTALKCAL HEI2020_TODDLERS_ALL HEI2020_TODDLERS_TOT…¹
##       <dbl> <chr>              <dbl>                <dbl>                  <dbl>
##  1        1 e6541891-8a22…     2019.                 60.8                   1.44
##  2        1 e6541891-8a22…     1010.                 60.8                   1.44
##  3        2 dbb278b0-b589…     1247.                 55.2                   5   
##  4        2 dbb278b0-b589…      623.                 55.2                   5   
##  5        3 f0115426-e6f8…     2206.                 47.8                   5   
##  6        3 f0115426-e6f8…     1103.                 47.8                   5   
##  7        4 337d84a7-3bff…     2095.                 50.7                   0   
##  8        4 337d84a7-3bff…     1047.                 50.7                   0   
##  9        5 998f098a-8584…     1209.                 39.3                   0   
## 10        5 998f098a-8584…      605.                 39.3                   0   
## # ℹ 32 more rows
## # ℹ abbreviated name: ¹​HEI2020_TODDLERS_TOTALFRT
## # ℹ 12 more variables: HEI2020_TODDLERS_FRT <dbl>, HEI2020_TODDLERS_VEG <dbl>,
## #   HEI2020_TODDLERS_GREENNBEAN <dbl>, HEI2020_TODDLERS_TOTALPRO <dbl>,
## #   HEI2020_TODDLERS_SEAPLANTPRO <dbl>, HEI2020_TODDLERS_WHOLEGRAIN <dbl>,
## #   HEI2020_TODDLERS_DAIRY <dbl>, HEI2020_TODDLERS_FATTYACID <dbl>,
## #   HEI2020_TODDLERS_REFINEDGRAIN <dbl>, HEI2020_TODDLERS_SODIUM <dbl>, …

Calculating HEI2015 for ASA24

DATA_PATH = "/Users/james/Desktop/data/Totals.csv"
HEI2015_ASA24(DATA_PATH)
#Use the example data
data("ASA24_exp")
HEI2015_ASA24(ASA24_exp)
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## # A tibble: 21 × 17
## # Groups:   UserName, UserID [21]
##    UserName UserID            TOTALKCAL HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
##       <dbl> <chr>                 <dbl>       <dbl>            <dbl>       <dbl>
##  1        1 e6541891-8a22-49…     1514.        69.8             1.26        2.45
##  2        2 dbb278b0-b589-44…      935.        52.8             5           0   
##  3        3 f0115426-e6f8-4c…     1655.        51.2             5           5   
##  4        4 337d84a7-3bff-48…     1571.        47.5             0           0   
##  5        5 998f098a-8584-49…      907.        45.2             0           0   
##  6        6 aae330db-8f22-4d…     1271.        52.9             3.78        5   
##  7        7 76e0f3e1-8e17-49…     2662.        48.4             1.51        2.23
##  8        8 24de994f-e06a-41…     2039.        69.0             2.76        5   
##  9        9 8f61ae64-6a82-4f…     1469.        70.9             5           5   
## 10       10 b47ab1b8-e62b-4b…     1636.        61.2             2.64        0   
## # ℹ 11 more rows
## # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
## #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>

Calculating aMED for ASA24

DATA_PATH = "/Users/james/Desktop/data/Totals.csv"
MED_ASA24(DATA_PATH)
#Use the example data
data("ASA24_exp")
MED_ASA24(ASA24_exp)
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## 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: 21 × 13
## # Groups:   UserName, UserID [21]
##    UserName UserID     MED_ALL MED_NOETOH MED_FRT MED_VEG MED_WGRAIN MED_LEGUMES
##       <dbl> <chr>        <dbl>      <dbl>   <dbl>   <dbl>      <dbl>       <dbl>
##  1        1 e6541891-…       7          7       1       1          1           1
##  2        2 dbb278b0-…       6          6       1       1          1           1
##  3        3 f0115426-…       5          5       1       1          1           0
##  4        4 337d84a7-…       6          6       0       1          1           1
##  5        5 998f098a-…       2          2       0       0          1           0
##  6        6 aae330db-…       4          4       1       1          0           0
##  7        7 76e0f3e1-…       5          5       1       1          1           0
##  8        8 24de994f-…       8          7       1       1          1           1
##  9        9 8f61ae64-…       6          6       1       1          1           1
## 10       10 b47ab1b8-…       6          6       1       1          1           1
## # ℹ 11 more rows
## # ℹ 5 more variables: MED_NUTS <dbl>, MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
## #   MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>

Calculating DII for ASA24

DATA_PATH = "/Users/james/Desktop/data/Totals.csv"
DII_ASA24(DATA_PATH)
#Use the example data
data("ASA24_exp")
DII_ASA24(ASA24_exp)
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## # A tibble: 21 × 32
## # Groups:   UserName [21]
##    UserName UserID DII_ALL DII_NOETOH ALCOHOL   VITB12  VITB6 BCAROTENE CAFFEINE
##       <dbl> <chr>    <dbl>      <dbl>   <dbl>    <dbl>  <dbl>     <dbl>    <dbl>
##  1        1 e6541… -0.0932     -0.371   0.278 -0.0766   0.127    -0.408   0.0848
##  2        2 dbb27…  2.93        2.65    0.278 -0.0982   0.136     0.295   0.0845
##  3        3 f0115…  1.39        1.11    0.278 -0.0185  -0.214     0.549   0.0850
##  4        4 337d8…  1.28        1.00    0.278  0.00997 -0.185     0.538   0.0850
##  5        5 998f0…  3.84        3.56    0.274 -0.0934   0.239     0.565   0.0844
##  6        6 aae33…  2.29        2.01    0.278 -0.0846  -0.359     0.554   0.0846
##  7        7 76e0f…  1.05        0.768   0.278 -0.0781  -0.206    -0.125   0.0839
##  8        8 24de9…  0.178       0.409  -0.231 -0.0608  -0.252     0.459   0.0850
##  9        9 8f61a…  0.805       0.527   0.278 -0.0908   0.134     0.564   0.0847
## 10       10 b47ab…  1.98        1.70    0.278 -0.0949   0.184     0.537   0.0845
## # ℹ 11 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>, VITD <dbl>, VITE <dbl>, ZN <dbl>

Calculating DASH for ASA24

DATA_PATH = "/Users/james/Desktop/data/items.csv"
DASH_ASA24(DATA_PATH)
#Use the example data
data("ASA24_exp_detailed")
DASH_ASA24(ASA24_exp_detailed)
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## Since no skim milk code is provided, the default skim milk code from 17-18 FNDDS file is used.
## Since no low-fat cheese code is provided, the default low-fat cheese code from 17-18 FNDDS file is used.
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 21 × 11
## # Groups:   UserName, UserID [21]
##    UserName UserID           DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN
##    <chr>    <chr>               <dbl>    <dbl>    <dbl>        <dbl>       <dbl>
##  1 THR01    e6541891-8a22-4…       28        5        5            5           5
##  2 THR02    dbb278b0-b589-4…       32        5        5            5           5
##  3 THR03    f0115426-e6f8-4…       28        5        5            5           5
##  4 THR04    337d84a7-3bff-4…       28        1        5            5           5
##  5 THR05    998f098a-8584-4…       16        1        1            1           5
##  6 THR06    aae330db-8f22-4…       24        5        5            1           1
##  7 THR07    76e0f3e1-8e17-4…       28        5        5            1           5
##  8 THR08    24de994f-e06a-4…       36        5        5            5           5
##  9 THR09    8f61ae64-6a82-4…       28        5        5            5           5
## 10 THR10    b47ab1b8-e62b-4…       36        5        5            5           5
## # ℹ 11 more rows
## # ℹ 4 more variables: DASH_LOWF_DAIRY <dbl>, DASH_SODIUM <dbl>,
## #   DASH_REDPROC_MEAT <dbl>, DASH_SSB_FRTJ <dbl>

Calculating AHEI for ASA24

DATA_PATH = "/Users/james/Desktop/data/items.csv"
AHEI_F_ASA24(DATA_PATH)
AHEI_M_ASA24(DATA_PATH)
#Use the example data
data("ASA24_exp_detailed")
AHEI_F_ASA24(ASA24_exp_detailed) # for participants who are all female
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## Reminder: this AHEI index is for female only. Please stratify your data first and provide female only data.
## # A tibble: 21 × 15
## # Groups:   UserName, UserID [21]
##    UserName UserID          AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN_F
##    <chr>    <chr>              <dbl>       <dbl>    <dbl>    <dbl>         <dbl>
##  1 THR01    e6541891-8a22-…     52.2        49.7    5.36     0.988         6.74 
##  2 THR02    dbb278b0-b589-…     44.9        42.4    6.94     0             0.302
##  3 THR03    f0115426-e6f8-…     39.1        36.6    9.24     2.48          1.03 
##  4 THR04    337d84a7-3bff-…     52.7        50.2    3.84     0             3.80 
##  5 THR05    998f098a-8584-…     46.1        36.7    0        0             2.06 
##  6 THR06    aae330db-8f22-…     45.1        42.6    3.16     2.56          0    
##  7 THR07    76e0f3e1-8e17-…     51.8        49.3    7.66     1.58          3.24 
##  8 THR08    24de994f-e06a-…     72.1        65.3    2.62     2.97         10    
##  9 THR09    8f61ae64-6a82-…     48.6        46.1    0.202    3.16          2.10 
## 10 THR10    b47ab1b8-e62b-…     58.6        56.1    5.27     0            10    
## # ℹ 11 more rows
## # ℹ 8 more variables: AHEI_NUTSLEG <dbl>, AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>,
## #   AHEI_SSB_FRTJ <dbl>, AHEI_REDPROC_MEAT <dbl>, AHEI_SODIUM <dbl>,
## #   AHEI_ALCOHOL_F <dbl>, SSB_FRTJ_SERV <dbl>
AHEI_M_ASA24(ASA24_exp_detailed) # for participants who are all male
## Since no SSB code is provided, the default SSB code from 17-18 FNDDS file is used.
## RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day...
## Reminder: this AHEI index is for male only. Please stratify your data first and provide male only data.
## # A tibble: 21 × 14
## # Groups:   UserName, UserID [21]
##    UserName UserID          AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN_M
##    <chr>    <chr>              <dbl>       <dbl>    <dbl>    <dbl>         <dbl>
##  1 THR01    e6541891-8a22-…     51.1        48.6    5.36     0.988         5.62 
##  2 THR02    dbb278b0-b589-…     44.9        42.4    6.94     0             0.251
##  3 THR03    f0115426-e6f8-…     39.0        36.5    9.24     2.48          0.857
##  4 THR04    337d84a7-3bff-…     52.1        49.6    3.84     0             3.17 
##  5 THR05    998f098a-8584-…     45.7        36.3    0        0             1.72 
##  6 THR06    aae330db-8f22-…     45.1        42.6    3.16     2.56          0    
##  7 THR07    76e0f3e1-8e17-…     51.2        48.7    7.66     1.58          2.70 
##  8 THR08    24de994f-e06a-…     75.3        65.3    2.62     2.97         10    
##  9 THR09    8f61ae64-6a82-…     48.2        45.7    0.202    3.16          1.75 
## 10 THR10    b47ab1b8-e62b-…     58.6        56.1    5.27     0            10    
## # ℹ 11 more rows
## # ℹ 7 more variables: AHEI_NUTSLEG <dbl>, AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>,
## #   AHEI_SSB_FRTJ <dbl>, AHEI_REDPROC_MEAT <dbl>, AHEI_SODIUM <dbl>,
## #   AHEI_ALCOHOL_M <dbl>

Calculating HEI2015 for DHQ3

DATA_PATH = "/Users/james/Desktop/data/results.csv"
HEI2015_DHQ3(DATA_PATH)
#Use the example data
data("DHQ3_exp")
HEI2015_DHQ3(DHQ3_exp)
## # A tibble: 23 × 16
##    `Respondent ID` TOTALKCAL HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
##              <dbl>     <dbl>       <dbl>            <dbl>       <dbl>
##  1               1     1849.        74.7            3.14        5    
##  2               2     1109.        77.9            4.96        5    
##  3               3     2134.        69.5            5           5    
##  4               4     1170.        77.1            5           5    
##  5               5     1238.        63.3            5           5    
##  6               6      759.        59.5            1.32        1.48 
##  7               7      727.        67.9            5           5    
##  8               8     1462.        66.7            3.59        5    
##  9               9     1080.        72.4            5           5    
## 10              10     1552.        55.5            0.684       0.644
## # ℹ 13 more rows
## # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
## #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>

Calculating aMED for DHQ3

DATA_PATH = "/Users/james/Desktop/data/results.csv"
MED_DHQ3(DATA_PATH)
#Use the example data
data("DHQ3_exp")
MED_DHQ3(DHQ3_exp)
## # A tibble: 23 × 12
##    RESPONDENTID MED_ALL MED_NOETOH MED_FRT MED_VEG MED_WGRAIN MED_LEGUMES
##           <dbl>   <dbl>      <dbl>   <dbl>   <dbl>      <dbl>       <dbl>
##  1            1       5          5       1       1          1           1
##  2            2       7          7       1       1          1           1
##  3            3       6          6       1       1          1           1
##  4            4       4          4       1       0          1           0
##  5            5       2          2       1       0          0           0
##  6            6       3          3       0       0          1           0
##  7            7       4          4       1       1          0           1
##  8            8       4          4       0       1          0           1
##  9            9       2          1       1       0          0           0
## 10           10       5          5       0       0          1           1
## # ℹ 13 more rows
## # ℹ 5 more variables: MED_NUTS <dbl>, MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
## #   MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>

Calculating AHEI for DHQ3

DATA_PATH = "/Users/james/Desktop/data/detail.csv"
AHEI_DHQ3(DATA_PATH)
#Use the example data
data("DHQ3_exp_detailed")
AHEI_DHQ3(DHQ3_exp_detailed)
## # A tibble: 23 × 15
##    RESPONDENTID GENDER AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN
##           <dbl>  <dbl>    <dbl>       <dbl>    <dbl>    <dbl>       <dbl>
##  1            1      1     61.7        59.2     5.36    2.3         7.18 
##  2            2      2     68.5        66.0     3.62    2.12        4.84 
##  3            3      2     58.3        49.9    10       3.33        2.65 
##  4            4      2     46.1        43.6     1.72    2.33        2.99 
##  5            5      2     60.4        50.4     2.68    2.75        1.06 
##  6            6      2     51.7        48.9     1.58    0.175       3.21 
##  7            7      1     54.8        52.3     4.12    3.18        1.48 
##  8            8      2     52.8        45.8     4.54    1.8         1.97 
##  9            9      2     61.7        51.7     1.58    2.55        0.983
## 10           10      2     54.2        50.6     2.1     0.175       5.44 
## # ℹ 13 more rows
## # ℹ 8 more variables: AHEI_NUTSLEG <dbl>, AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>,
## #   AHEI_SSB_FRTJ <dbl>, AHEI_REDPROC_MEAT <dbl>, AHEI_TRANS <dbl>,
## #   AHEI_SODIUM <dbl>, AHEI_ALCOHOL <dbl>

Calculating DASH for DHQ3

DATA_PATH = "/Users/james/Desktop/data/detail.csv"
DASH_DHQ3(DATA_PATH)
#Use the example data. Attention: the example data here is DHQ3_exp_detailed, which is different from DHQ3_exp. DHQ3_exp_detailed is only used for DASH_DHQ3
data("DHQ3_exp_detailed")
DASH_DHQ3(DHQ3_exp_detailed)
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 23 × 10
##    `Respondent ID` DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN
##              <dbl>    <dbl>    <dbl>    <dbl>        <dbl>       <dbl>
##  1               1       25        3        4            5           5
##  2               2       29        3        3            5           5
##  3               3       24        5        5            4           3
##  4               4       23        5        1            2           3
##  5               5       25        4        2            2           2
##  6               6       19        1        1            1           3
##  7               7       26        4        4            3           3
##  8               8       20        3        4            4           3
##  9               9       20        4        1            2           1
## 10              10       20        1        2            3           5
## # ℹ 13 more rows
## # ℹ 4 more variables: DASH_LOWF_DAIRY <dbl>, DASH_SODIUM <dbl>,
## #   DASH_REDPROC_MEAT <dbl>, DASH_SSB_FRTJ <dbl>

Calculating AHEI for BLOCK

DATA_PATH = "/Users/james/Desktop/block_exp.csv"
AHEI_BLOCK(DATA_PATH)
#Use the example data
data("BLOCK_exp")
AHEI_BLOCK(BLOCK_exp)
## # A tibble: 5 × 15
##   RESPONDENTID GENDER AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN
##          <dbl>  <dbl>    <dbl>       <dbl>    <dbl>    <dbl>       <dbl>
## 1            1      1     48.1        45.6    1.58     3.69        5.01 
## 2            2      1     33.5        31.0    0.695    0.527       0.794
## 3            3      1     49.1        39.1    3.94     2.63        5.89 
## 4            4      1     47.1        44.6    1.79     5.39        5.17 
## 5            5      1     52.5        50.0    6.06     9.18        3.94 
## # ℹ 8 more variables: AHEI_NUTSLEG <dbl>, AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>,
## #   AHEI_SSB_FRTJ <dbl>, AHEI_REDPROC_MEAT <dbl>, AHEI_TRANS <dbl>,
## #   AHEI_SODIUM <dbl>, AHEI_ALCOHOL <dbl>

Calculating AHEIP for BLOCK

#Use the example data
data("BLOCK_exp")
AHEIP_BLOCK(BLOCK_exp)
## # A tibble: 5 × 11
##   RESPONDENTID AHEIP_ALL AHEIP_VEG AHEIP_FRT AHEIP_WHITEREAD AHEIP_FIBER
##          <dbl>     <dbl>     <dbl>     <dbl>           <dbl>       <dbl>
## 1            1      38.3     1.58      3.69            0.351        5.41
## 2            2      26.0     0.695     0.527           0.717        4.42
## 3            3      51.6     3.94      2.63            0.477        8.3 
## 4            4      47.4     1.79      5.39            0.756        9.93
## 5            5      62.5     6.06      9.18            2.06         8.45
## # ℹ 5 more variables: AHEIP_TRANS <dbl>, AHEIP_POLYSAT <dbl>,
## #   AHEIP_CALCIUM <dbl>, AHEIP_FOLATE <dbl>, AHEIP_IRON <dbl>

Calculating DASH for BLOCK

#Use the example data
data("BLOCK_exp")
DASH_BLOCK(BLOCK_exp)
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 5 × 25
##   RESPONDENTID DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN
##          <dbl>    <dbl>    <dbl>    <dbl>        <dbl>       <dbl>
## 1            1       28        3        2            4           3
## 2            2       19        1        1            5           1
## 3            3       23        2        4            3           5
## 4            4       23        4        3            2           4
## 5            5       28        5        5            1           2
## # ℹ 19 more variables: DASH_LOWF_DAIRY <dbl>, DASH_SODIUM <dbl>,
## #   DASH_REDPROC_MEAT <dbl>, DASH_SSB_FRTJ <dbl>, DT_KCAL <dbl>,
## #   F_BERRIES <dbl>, F_WHOLE <dbl>, FRT_FRTJ_SERV <dbl>, VEG_SERV <dbl>,
## #   NUTSLEG_SERV <dbl>, WGRAIN_SERV <dbl>, LOWF_MILK_SERV <dbl>,
## #   YOGURT_SERV <dbl>, LOWF_ICECREAMFROYO_SERV <dbl>, LOWF_CHEESE_SERV <dbl>,
## #   LOWF_DAIRY_SERV <dbl>, SODIUM_SERV <dbl>, REDPROC_MEAT_SERV <dbl>,
## #   SSB_FRTJ_SERV <dbl>

Calculating DII for BLOCK

#Use the example data
data("BLOCK_exp")
DII_BLOCK(BLOCK_exp)
## # A tibble: 5 × 34
##   RESPONDENTID DII_ALL DII_NOETOH ALCOHOL  VITB12   VITB6 BCAROTENE CAFFEINE
##          <dbl>   <dbl>      <dbl>   <dbl>   <dbl>   <dbl>     <dbl>    <dbl>
## 1            1   3.74        3.46   0.278 -0.0682 -0.0157    0.464    0.0850
## 2            2   2.65        2.37   0.278 -0.0428  0.0928    0.552    0.0845
## 3            3  -1.59       -1.72   0.124  0.0986 -0.346     0.403    0.0849
## 4            4  -1.13       -1.41   0.278 -0.0588 -0.192    -0.0426   0.0842
## 5            5  -0.724      -1.00   0.278 -0.0758 -0.204    -0.584    0.0845
## # ℹ 26 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>, TRANSFAT <dbl>,
## #   VITA <dbl>, VITC <dbl>, VITD <dbl>, VITE <dbl>, ZN <dbl>, TEA <dbl>,
## #   ISOFLAVONES <dbl>

Calculating HEI2015 for BLOCK

#Use the example data
data("BLOCK_exp")
HEI2015_BLOCK(BLOCK_exp)
## # A tibble: 5 × 15
##   RESPONDENTID HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT HEI2015_VEG
##          <dbl>       <dbl>            <dbl>       <dbl>       <dbl>
## 1            1        76.6            5            5           2.57
## 2            2        42.0            0.986        1.08        1.32
## 3            3        56.0            2.25         3.56        2.42
## 4            4        48.7            5            5           1.11
## 5            5        65.7            5            5           5   
## # ℹ 10 more variables: HEI2015_GREENNBEAN <dbl>, HEI2015_TOTALPRO <dbl>,
## #   HEI2015_SEAPLANTPRO <dbl>, HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>,
## #   HEI2015_FATTYACID <dbl>, HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>,
## #   HEI2015_ADDEDSUGAR <dbl>, HEI2015_SATFAT <dbl>

Calculating aMED for BLOCK

#Use the example data
data("BLOCK_exp")
MED_BLOCK(BLOCK_exp)
## 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: 5 × 12
##   RESPONDENTID MED_ALL MED_NOETOH MED_FRT MED_VEG MED_WGRAIN MED_LEGUMES
##          <dbl>   <dbl>      <dbl>   <dbl>   <dbl>      <dbl>       <dbl>
## 1            1       6          6       1       0          1           1
## 2            2       4          4       0       0          0           1
## 3            3       7          6       0       1          1           1
## 4            4       3          3       1       1          1           0
## 5            5       4          4       1       1          0           0
## # ℹ 5 more variables: MED_NUTS <dbl>, MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
## #   MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>

Calculating HEI2020 for your own dietary assessment tool

#Use the example data
data("HEI2020_VALIDATION")
HEI2020(SERV_DATA = HEI2020_VALIDATION,RESPONDENTID = HEI2020_VALIDATION$id,AGE = HEI2020_VALIDATION$age,TOTALKCAL_HEI2020 = HEI2020_VALIDATION$kcal,TOTALFRT_SERV_HEI2020 = HEI2020_VALIDATION$total_fruit,FRT_SERV_HEI2020 = HEI2020_VALIDATION$whole_fruit,VEG_SERV_HEI2020 = HEI2020_VALIDATION$total_vegetable,GREENNBEAN_SERV_HEI2020 = HEI2020_VALIDATION$green_and_bean,TOTALPRO_SERV_HEI2020 = HEI2020_VALIDATION$total_protein,SEAPLANTPRO_SERV_HEI2020 = HEI2020_VALIDATION$seafood_plant_protein,WHOLEGRAIN_SERV_HEI2020 = HEI2020_VALIDATION$whole_grain,DAIRY_SERV_HEI2020 = HEI2020_VALIDATION$dairy,FATTYACID_SERV_HEI2020 = HEI2020_VALIDATION$fatty_acid,REFINEDGRAIN_SERV_HEI2020 = HEI2020_VALIDATION$refined_grain,SODIUM_SERV_HEI2020 = HEI2020_VALIDATION$sodium,ADDEDSUGAR_SERV_HEI2020 = HEI2020_VALIDATION$added_sugar,SATFAT_SERV_HEI2020 = HEI2020_VALIDATION$saturated_fat)
## # A tibble: 22 × 17
##    RESPONDENTID   AGE TOTALKCAL_HEI2020 HEI2020_ALL HEI2020_TOTALFRT HEI2020_FRT
##           <dbl> <dbl>             <dbl>       <dbl>            <dbl>       <dbl>
##  1            1    18              1000          40              0           0  
##  2            2    18              1000          42              0.5         0.5
##  3            3    18              1000          44              1           1  
##  4            4    18              1000          46              1.5         1.5
##  5            5    18              1000          48              2           2  
##  6            6    18              1000          50              2.5         2.5
##  7            7    18              1000          52              3           3  
##  8            8    18              1000          54              3.5         3.5
##  9            9    18              1000          56              4           4  
## 10           10    18              1000          58              4.5         4.5
## # ℹ 12 more rows
## # ℹ 11 more variables: HEI2020_VEG <dbl>, HEI2020_GREENNBEAN <dbl>,
## #   HEI2020_TOTALPRO <dbl>, HEI2020_SEAPLANTPRO <dbl>,
## #   HEI2020_WHOLEGRAIN <dbl>, HEI2020_DAIRY <dbl>, HEI2020_FATTYACID <dbl>,
## #   HEI2020_REFINEDGRAIN <dbl>, HEI2020_SODIUM <dbl>, HEI2020_ADDEDSUGAR <dbl>,
## #   HEI2020_SATFAT <dbl>

Calculating HEI2015 for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

HEI2015(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$TOTALKCAL, SERV_DATA$VEG_SERV, SERV_DATA$FRT_SERV, SERV_DATA$WGRAIN_SERV, SERV_DATA$NUTSLEG_SERV, SERV_DATA$N3FAT_SERV, SERV_DATA$PUFA_SERV, SERV_DATA$SSB_FRTJ_SERV, SERV_DATA$REDPROC_MEAT_SERV, SERV_DATA$TRANS_SERV, SERV_DATA$SODIUM_SERV, SERV_DATA$ALCOHOL_SERV)
#Use the example data
data("SERV_DATA_exp")
HEI2015(SERV_DATA_exp, SERV_DATA_exp$UserName, SERV_DATA_exp$TOTALKCAL, SERV_DATA_exp$TOTALFRT_SERV_HEI2015_exp, SERV_DATA_exp$FRT_SERV_HEI2015_exp, SERV_DATA_exp$VEG_SERV_HEI2015_exp, SERV_DATA_exp$GREENNBEAN_SERV_HEI2015_exp, SERV_DATA_exp$TOTALPRO_SERV_HEI2015_exp,  SERV_DATA_exp$SEAPLANTPRO_SERV_HEI2015_exp, SERV_DATA_exp$WHOLEGRAIN_SERV_HEI2015_exp, SERV_DATA_exp$DAIRY_SERV_HEI2015_exp, SERV_DATA_exp$FATTYACID_SERV_HEI2015_exp, SERV_DATA_exp$REFINEDGRAIN_SERV_HEI2015_exp,  SERV_DATA_exp$SODIUM_SERV_HEI2015_exp, SERV_DATA_exp$ADDEDSUGAR_SERV_HEI2015_exp, SERV_DATA_exp$SATFAT_SERV_HEI2015_exp)
## # A tibble: 21 × 16
##    RESPONDENTID TOTALKCAL_HEI2015 HEI2015_ALL HEI2015_TOTALFRT HEI2015_FRT
##           <dbl>             <dbl>       <dbl>            <dbl>       <dbl>
##  1            1             2019.        69.8             1.26        2.45
##  2            2             1247.        52.8             5           0   
##  3            3             2206.        51.2             5           5   
##  4            4             2095.        47.5             0           0   
##  5            5             1209.        45.2             0           0   
##  6            6             1694.        52.9             3.78        5   
##  7            7             3549.        48.4             1.51        2.23
##  8            8             2718.        69.0             2.76        5   
##  9            9             1959.        70.9             5           5   
## 10           10             2181.        61.2             2.64        0   
## # ℹ 11 more rows
## # ℹ 11 more variables: HEI2015_VEG <dbl>, HEI2015_GREENNBEAN <dbl>,
## #   HEI2015_TOTALPRO <dbl>, HEI2015_SEAPLANTPRO <dbl>,
## #   HEI2015_WHOLEGRAIN <dbl>, HEI2015_DAIRY <dbl>, HEI2015_FATTYACID <dbl>,
## #   HEI2015_REFINEDGRAIN <dbl>, HEI2015_SODIUM <dbl>, HEI2015_ADDEDSUGAR <dbl>,
## #   HEI2015_SATFAT <dbl>

Calculating AHEI for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

AHEI(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$GENDER, SERV_DATA$VEG_SERV, SERV_DATA$FRT_SERV, SERV_DATA$WGRAIN_SERV, SERV_DATA$NUTSLEG_SERV, SERV_DATA$N3FAT_SERV, SERV_DATA$PUFA_SERV, SERV_DATA$SSB_FRTJ_SERV, SERV_DATA$REDPROC_MEAT_SERV, SERV_DATA$TRANS_SERV,SODIUM_SERV, SERV_DATA$ALCOHOL_SERV)
#Use the example data
data("SERV_DATA_exp")
AHEI(SERV_DATA_exp, SERV_DATA_exp$UserName, SERV_DATA_exp$SEX, SERV_DATA_exp$TOTALKCAL, SERV_DATA_exp$VEG_SERV_AHEI_exp, SERV_DATA_exp$FRT_SERV_AHEI_exp, SERV_DATA_exp$WGRAIN_SERV_AHEI_exp, SERV_DATA_exp$NUTSLEG_SERV_AHEI_exp, SERV_DATA_exp$N3FAT_SERV_AHEI_exp, SERV_DATA_exp$PUFA_SERV_AHEI_exp, SERV_DATA_exp$SSB_FRTJ_SERV_AHEI_exp, SERV_DATA_exp$REDPROC_MEAT_SERV_AHEI_exp, SERV_DATA_exp$TRANS_SERV_AHEI_exp, SERV_DATA_exp$SODIUM_SERV_AHEI_exp, SERV_DATA_exp$ALCOHOL_SERV_AHEI_exp)
## # A tibble: 21 × 15
##    RESPONDENTID GENDER AHEI_ALL AHEI_NOETOH AHEI_VEG AHEI_FRT AHEI_WGRAIN
##           <dbl>  <dbl>    <dbl>       <dbl>    <dbl>    <dbl>       <dbl>
##  1            1      1     56.9        54.4    2.68     0.988       5.62 
##  2            2      1     43.4        40.9    3.47     0           0.251
##  3            3      1     34.3        31.8    4.62     2.48        0.857
##  4            4      1     50.1        47.6    1.92     0           3.17 
##  5            5      1     47.3        37.9    0        0           1.72 
##  6            6      1     52.2        49.7    1.58     2.56        0    
##  7            7      1     47.4        44.9    3.83     1.58        2.70 
##  8            8      1     80.2        70.2    1.31     2.97       10    
##  9            9      1     57.0        54.5    0.101    3.16        1.75 
## 10           10      1     56.0        53.5    2.63     0          10    
## # ℹ 11 more rows
## # ℹ 8 more variables: AHEI_NUTSLEG <dbl>, AHEI_N3FAT <dbl>, AHEI_PUFA <dbl>,
## #   AHEI_SSB_FRTJ <dbl>, AHEI_REDPROC_MEAT <dbl>, AHEI_TRANS <dbl>,
## #   AHEI_SODIUM <dbl>, AHEI_ALCOHOL <dbl>

Calculating DASH for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

DASH(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$TOTALKCAL_DASH, SERV_DATA$FRT_FRTJ_SERV_DASH, SERV_DATA$VEG_SERV_DASH, SERV_DATA$NUTSLEG_SERV_DASH, SERV_DATA$WGRAIN_SERV_DASH, SERV_DATA$LOWF_DAIRY_SERV_DASH, SERV_DATA$SODIUM_SERV_DASH, SERV_DATA$REDPROC_MEAT_SERV_DASH, SERV_DATA$SSB_FRTJ_SERV_DASH)
#Use the example data
data("SERV_DATA_exp")
DASH(SERV_DATA_exp, SERV_DATA_exp$UserName, SERV_DATA_exp$TOTALKCAL, SERV_DATA_exp$FRT_FRTJ_SERV_DASH_exp, SERV_DATA_exp$VEG_SERV_DASH_exp, SERV_DATA_exp$NUTSLEG_SERV_DASH_exp, SERV_DATA_exp$WGRAIN_SERV_DASH_exp, SERV_DATA_exp$LOWF_DAIRY_SERV_DASH_exp, SERV_DATA_exp$SODIUM_SERV_DASH_exp, SERV_DATA_exp$REDPROC_MEAT_SERV_DASH_exp, SERV_DATA_exp$SSB_FRTJ_SERV_DASH_exp)
## Reminder: this DASH index uses quintiles to rank participants' food/drink serving sizes and then calculate DASH component scores, which may generate results that are specific to your study population but not comparable to other populations.
## # A tibble: 21 × 10
##    RESPONDENTID DASH_ALL DASH_FRT DASH_VEG DASH_NUTSLEG DASH_WGRAIN
##           <dbl>    <dbl>    <dbl>    <dbl>        <dbl>       <dbl>
##  1            1       29        2        3            5           5
##  2            2       22        5        3            2           2
##  3            3       18        5        5            2           2
##  4            4       25        1        2            3           5
##  5            5       16        1        1            1           3
##  6            6       23        4        2            1           1
##  7            7       26        3        4            1           4
##  8            8       29        4        1            3           5
##  9            9       27        5        1            5           3
## 10           10       29        3        3            4           5
## # ℹ 11 more rows
## # ℹ 4 more variables: DASH_LOWF_DAIRY <dbl>, DASH_SODIUM <dbl>,
## #   DASH_REDPROC_MEAT <dbl>, DASH_SSB_FRTJ <dbl>

Calculating DASHI for your own dietary assessment tool

#Use the example data
data("DASH_trial")
DASHI(SERV_DATA = DASH_trial, RESPONDENTID = DASH_trial$Diet_Type,TOTALKCAL_DASHI = DASH_trial$Kcal, TOTAL_FAT_DASHI = DASH_trial$Totalfat_Percent, SAT_FAT_DASHI = DASH_trial$Satfat_Percent, PROTEIN_DASHI = DASH_trial$Protein_Percent, CHOLESTEROL_DASHI = DASH_trial$Cholesterol, FIBER_DASHI = DASH_trial$Fiber, POTASSIUM_DASHI = DASH_trial$Potassium, MAGNESIUM_DASHI = DASH_trial$Magnesium, CALCIUM_DASHI = DASH_trial$Calcium, SODIUM_DASHI = DASH_trial$Sodium)
## # A tibble: 5 × 12
##   RESPONDENTID    DASHI_ALL TOTALKCAL_DASHI DASHI_TOTAL_FAT DASHI_SAT_FAT
##   <chr>               <dbl>           <dbl>           <dbl>         <dbl>
## 1 DASH                7.79             2100           1              0.9 
## 2 DASH_lowSodium      8.79             2100           1              0.9 
## 3 DASH_MedSodium      8.76             2100           1              0.9 
## 4 DASH_HighSodium     7.79             2100           1              0.9 
## 5 Control             0.833            2100           0.130          0.19
## # ℹ 7 more variables: DASHI_PROTEIN <dbl>, DASHI_CHOLESTEROL <dbl>,
## #   DASHI_FIBER <dbl>, DASHI_POTASSIUM <dbl>, DASHI_MAGNESIUM <dbl>,
## #   DASHI_CALCIUM <dbl>, DASHI_SODIUM <dbl>

Calculating aMED for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

MED(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$FRT_FRTJ_SERV, SERV_DATA$VEG_SERV, SERV_DATA$WGRAIN_SERV, SERV_DATA$LEGUMES_SERV, SERV_DATA$NUTS_SERV,FISH_SERV, SERV_DATA$REDPROC_MEAT_SERV, SERV_DATA$MONSATFAT_SERV, SERV_DATA$ALCOHOL_SERV)
#Use the example data
data("SERV_DATA_exp")
MED(SERV_DATA_exp, SERV_DATA_exp$UserName, SERV_DATA_exp$FRT_FRTJ_SERV_MED_exp, SERV_DATA_exp$VEG_SERV_MED_exp, SERV_DATA_exp$WGRAIN_SERV_MED_exp, SERV_DATA_exp$LEGUMES_SERV_MED_exp, SERV_DATA_exp$NUTS_SERV_MED_exp, SERV_DATA_exp$FISH_SERV_MED_exp, SERV_DATA_exp$REDPROC_MEAT_SERV_MED_exp, SERV_DATA_exp$MONSATFAT_SERV_MED_exp, SERV_DATA_exp$ALCOHOL_SERV_MED_exp)
## 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: 21 × 12
##    RESPONDENTID MED_ALL MED_NOETOH MED_FRT MED_VEG MED_WGRAIN MED_LEGUMES
##           <dbl>   <dbl>      <dbl>   <dbl>   <dbl>      <dbl>       <dbl>
##  1            1       6          6       0       1          1           1
##  2            2       4          4       1       1          0           1
##  3            3       4          4       1       1          0           0
##  4            4       4          4       0       0          1           1
##  5            5       0          0       0       0          0           0
##  6            6       3          3       1       0          0           0
##  7            7       4          4       1       1          1           0
##  8            8       5          5       1       0          1           0
##  9            9       5          5       1       0          1           1
## 10           10       4          4       1       0          1           1
## # ℹ 11 more rows
## # ℹ 5 more variables: MED_NUTS <dbl>, MED_FISH <dbl>, MED_REDPROC_MEAT <dbl>,
## #   MED_MONSATFAT <dbl>, MED_ALCOHOL <dbl>

Calculating MEDI for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

MEDI(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$OLIVE_OIL_SERV_MEDI, SERV_DATA$FRT_SERV_MEDI, SERV_DATA$VEG_SERV_MEDI, SERV_DATA$LEGUMES_SERV_MEDI, SERV_DATA$NUTS_SERV_MEDI, SERV_DATA$FISH_SEAFOOD_SERV_MEDI, SERV_DATA$ALCOHOL_SERV_MEDI, SERV_DATA$SSB_SERV_MEDI, SERV_DATA$SWEETS_SERV_MEDI, SERV_DATA$DISCRET_FAT_SERV_MEDI, SERV_DATA$REDPROC_MEAT_SERV_MEDI)
#Use the example data
data("PREDIMED_trial")

# MEDI is 0/1 point scoring criteria.
MEDI(
  SERV_DATA = PREDIMED_trial,
  RESPONDENTID = PREDIMED_trial$Diet_Type,
  OLIVE_OIL_SERV_MEDI = PREDIMED_trial$Virgin_Oliveoil,
  FRT_SERV_MEDI = PREDIMED_trial$Fruits, 
  VEG_SERV_MEDI = PREDIMED_trial$Vegetables,
  LEGUMES_SERV_MEDI = PREDIMED_trial$Legumes,
  NUTS_SERV_MEDI = PREDIMED_trial$Total_nuts,
  FISH_SEAFOOD_SERV_MEDI = PREDIMED_trial$Fish_Seafood,
  ALCOHOL_SERV_MEDI = PREDIMED_trial$Alcohol,
  SSB_SERV_MEDI = PREDIMED_trial$Soda_Drinks,
  SWEETS_SERV_MEDI = PREDIMED_trial$Sweets,
  DISCRET_FAT_SERV_MEDI = PREDIMED_trial$Refined_Oliveoil,
  REDPROC_MEAT_SERV_MEDI = PREDIMED_trial$Meat)
## # A tibble: 3 × 14
##   RESPONDENTID MEDI_ALL MEDI_NOETOH MEDI_OLIVE_OIL MEDI_FRT MEDI_VEG
##   <chr>           <dbl>       <dbl>          <dbl>    <dbl>    <dbl>
## 1 Med_Oliveoil        8           7              1        1        1
## 2 Med_Nuts            7           7              0        1        1
## 3 Control             5           5              0        0        1
## # ℹ 8 more variables: MEDI_LEGUMES <dbl>, MEDI_NUTS <dbl>, MEDI_FISH <dbl>,
## #   MEDI_ALCOHOL <dbl>, MEDI_SSB <dbl>, MEDI_SWEETS <dbl>,
## #   MEDI_DISCRET_FAT <dbl>, MEDI_REDPROC_MEAT <dbl>
# MEDI_V2 is 5 point scoring criteria
MEDI_V2(
    SERV_DATA = PREDIMED_trial,
    RESPONDENTID = PREDIMED_trial$Diet_Type,
    OLIVE_OIL_SERV_MEDI = PREDIMED_trial$Virgin_Oliveoil,
    FRT_SERV_MEDI = PREDIMED_trial$Fruits, 
    VEG_SERV_MEDI = PREDIMED_trial$Vegetables,
    LEGUMES_SERV_MEDI = PREDIMED_trial$Legumes,
    NUTS_SERV_MEDI = PREDIMED_trial$Total_nuts,
    FISH_SEAFOOD_SERV_MEDI = PREDIMED_trial$Fish_Seafood,
    ALCOHOL_SERV_MEDI = PREDIMED_trial$Alcohol,
    SSB_SERV_MEDI = PREDIMED_trial$Soda_Drinks,
    SWEETS_SERV_MEDI = PREDIMED_trial$Sweets,
    DISCRET_FAT_SERV_MEDI = PREDIMED_trial$Refined_Oliveoil,
    REDPROC_MEAT_SERV_MEDI = PREDIMED_trial$Meat
)
## # A tibble: 3 × 14
##   RESPONDENTID MEDI_V2_ALL MEDI_V2_NOETOH MEDI_OLIVE_OIL MEDI_FRT MEDI_VEG
##   <chr>              <dbl>          <dbl>          <dbl>    <dbl>    <dbl>
## 1 Med_Oliveoil        42.5           35.0           5        5           5
## 2 Med_Nuts            36.7           30.8           3.19     5           5
## 3 Control             33.7           29.1           2.27     4.92        5
## # ℹ 8 more variables: MEDI_LEGUMES <dbl>, MEDI_NUTS <dbl>, MEDI_FISH <dbl>,
## #   MEDI_ALCOHOL <dbl>, MEDI_SSB <dbl>, MEDI_SWEETS <dbl>,
## #   MEDI_DISCRET_FAT <dbl>, MEDI_REDPROC_MEAT <dbl>

Calculating DII for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

DII(SERV_DATA, SERV_DATA$RESPONDENTID, REPEATNUM=1, SERV_DATA$ALCOHOL_DII, SERV_DATA$VITB12_DII, SERV_DATA$VITB6_DII, SERV_DATA$BCAROTENE_DII, SERV_DATA$CAFFEINE_DII, SERV_DATA$CARB_DII, SERV_DATA$CHOLES_DII, SERV_DATA$KCAL_DII, SERV_DATA$EUGENOL_DII, SERV_DATA$TOTALFAT_DII, SERV_DATA$FIBER_DII, SERV_DATA$FOLICACID_DII, SERV_DATA$GARLIC_DII, SERV_DATA$GINGER_DII, SERV_DATA$IRON_DII, SERV_DATA$MG_DII, SERV_DATA$MUFA_DII, SERV_DATA$NIACIN_DII, SERV_DATA$N3FAT_DII, SERV_DATA$N6FAT_DII, SERV_DATA$ONION_DII, SERV_DATA$PROTEIN_DII, SERV_DATA$PUFA_DII, SERV_DATA$RIBOFLAVIN_DII, SERV_DATA$SAFFRON_DII, SERV_DATA$SATFAT_DII, SERV_DATA$SE_DII, SERV_DATA$THIAMIN_DII, SERV_DATA$TRANSFAT_DII, SERV_DATA$TURMERIC_DII, SERV_DATA$VITA_DII, SERV_DATA$VITC_DII, SERV_DATA$VITD_DII, SERV_DATA$VITE_DII, SERV_DATA$ZN_DII, SERV_DATA$TEA_DII, SERV_DATA$FLA3OL_DII, SERV_DATA$FLAVONES_DII, SERV_DATA$FLAVONOLS_DII, SERV_DATA$FLAVONONES_DII, SERV_DATA$ANTHOC_DII, SERV_DATA$ISOFLAVONES_DII, SERV_DATA$PEPPER_DII, SERV_DATA$THYME_DII, SERV_DATA$ROSEMARY_DII)
#Use the example data
data("DHQ3_exp")
DII(DHQ3_exp, DHQ3_exp$`Respondent ID`, 1, DHQ3_exp$`Alcohol (g)`, DHQ3_exp$`Vitamin B12 (mcg)`, DHQ3_exp$`Vitamin B6 (mg)`)
## It is normal to see warnings if you do not provide all arguments using DII. The algorithm will only count the arguments you enter to calculate the DII. All warnings are about the first column you don't use. For example, if you only entered alcohol, vitamin b12, and vitamin b6, all warnings would remind you that bcarotene is not found.
## Warning: Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## Unknown or uninitialised column: `BCAROTENE_DII`.
## # A tibble: 23 × 49
## # Groups:   RESPONDENTID [23]
##    RESPONDENTID DII_ALL DII_NOETOH REPEATNUM ALCOHOL_DII VITB12_DII VITB6_DII
##           <dbl>   <dbl>      <dbl>     <dbl>       <dbl>      <dbl>     <dbl>
##  1            1  0.0479    -0.230          1       0.278    -0.0232   -0.207 
##  2            2  0.208     -0.0697         1       0.278    -0.0855    0.0157
##  3            3 -0.115     -0.384          1       0.270    -0.0361   -0.348 
##  4            4  0.0194    -0.258          1       0.278    -0.0486   -0.210 
##  5            5  0.277      0.0425         1       0.234    -0.0760    0.119 
##  6            6  0.448      0.170          1       0.278    -0.0949    0.265 
##  7            7  0.348      0.0699         1       0.278    -0.0869    0.157 
##  8            8 -0.0124    -0.286          1       0.274    -0.0574   -0.229 
##  9            9  0.101     -0.0525         1       0.153    -0.0682    0.0157
## 10           10  0.170     -0.108          1       0.277    -0.0297   -0.0778
## # ℹ 13 more rows
## # ℹ 42 more variables: BCAROTENE_DII <dbl>, CAFFEINE_DII <int>, CARB_DII <int>,
## #   CHOLES_DII <int>, KCAL_DII <int>, EUGENOL_DII <int>, TOTALFAT_DII <int>,
## #   FIBER_DII <int>, FOLICACID_DII <int>, GARLIC_DII <int>, GINGER_DII <int>,
## #   IRON_DII <int>, MG_DII <int>, MUFA_DII <int>, NIACIN_DII <int>,
## #   N3FAT_DII <int>, N6FAT_DII <int>, ONION_DII <int>, PROTEIN_DII <int>,
## #   PUFA_DII <int>, RIBOFLAVIN_DII <int>, SAFFRON_DII <int>, …

Calculating ACS2020_V1 or ACS2020_V2 for your own dietary assessment tool

DATA_PATH <- "/Users/james/Desktop/data.csv"
SERV_DATA <- read_csv(DATA_PATH)

ACS2020_V1(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$GENDER, SERV_DATA$VEG_SERV_ACS2020, SERV_DATA$VEG_ITEMS_SERV_ACS2020, SERV_DATA$FRT_SERV_ACS2020, SERV_DATA$FRT_ITEMS_SERV_ACS2020, SERV_DATA$WGRAIN_SERV_ACS2020, SERV_DATA$SSB_FRTJ_SERV_ACS2020, SERV_DATA$REDPROC_MEAT_SERV_ACS2020, SERV_DATA$HPFRG_RATIO_SERV_ACS2020)

ACS2020_V2(SERV_DATA, SERV_DATA$RESPONDENTID, SERV_DATA$GENDER, SERV_DATA$TOTALKCAL_ACS2020, SERV_DATA$VEG_SERV_ACS2020, SERV_DATA$VEG_ITEMS_SERV_ACS2020, SERV_DATA$FRT_SERV_ACS2020, SERV_DATA$FRT_ITEMS_SERV_ACS2020, SERV_DATA$WGRAIN_SERV_ACS2020, SERV_DATA$SSB_FRTJ_SERV_ACS2020, SERV_DATA$REDPROC_MEAT_SERV_ACS2020, SERV_DATA$HPFRG_SERV_ACS2020)

Calculating PHDI for your own dietary assessment tool

#Use the example data
data("PHDI_VALIDATION")

PHDI(SERV_DATA=PHDI_VALIDATION, PHDI_VALIDATION$id, PHDI_VALIDATION$gender, PHDI_VALIDATION$TOTALKCAL_PHDI, PHDI_VALIDATION$WGRAIN_SERV_PHDI, PHDI_VALIDATION$STARCHY_VEG_SERV_PHDI, PHDI_VALIDATION$VEG_SERV_PHDI, PHDI_VALIDATION$FRT_SERV_PHDI, PHDI_VALIDATION$DAIRY_SERV_PHDI, PHDI_VALIDATION$REDPROC_MEAT_SERV_PHDI, PHDI_VALIDATION$POULTRY_SERV_PHDI, PHDI_VALIDATION$EGG_SERV_PHDI, PHDI_VALIDATION$FISH_SERV_PHDI, PHDI_VALIDATION$NUTS_SERV_PHDI, PHDI_VALIDATION$LEGUMES_SERV_PHDI, PHDI_VALIDATION$SOY_SERV_PHDI, PHDI_VALIDATION$ADDED_FAT_UNSAT_SERV_PHDI, PHDI_VALIDATION$ADDED_FAT_SAT_TRANS_SERV_PHDI, PHDI_VALIDATION$ADDED_SUGAR_SERV_PHDI)
## # A tibble: 26 × 19
##    RESPONDENTID GENDER PHDI_ALL TOTALKCAL_PHDI PHDI_WGRAIN PHDI_STARCHY_VEG
##           <dbl>  <dbl>    <dbl>          <dbl>       <dbl>            <dbl>
##  1            1      2        0           2000           0                0
##  2            2      2        0           2000           0                0
##  3            3      2       14           2000           1                1
##  4            4      2       28           2000           2                2
##  5            5      2       42           2000           3                3
##  6            6      2       56           2000           4                4
##  7            7      2       70           2000           5                5
##  8            8      2       84           2000           6                6
##  9            9      2       98           2000           7                7
## 10           10      2      112           2000           8                8
## # ℹ 16 more rows
## # ℹ 13 more variables: PHDI_VEG <dbl>, PHDI_FRT <dbl>, PHDI_DAIRY <dbl>,
## #   PHDI_REDPROC_MEAT <dbl>, PHDI_POULTRY <dbl>, PHDI_EGG <dbl>,
## #   PHDI_FISH <dbl>, PHDI_NUTS <dbl>, PHDI_LEGUMES <dbl>, PHDI_SOY <dbl>,
## #   PHDI_ADDED_FAT_UNSAT <dbl>, PHDI_ADDED_FAT_SAT <dbl>,
## #   PHDI_ADDED_SUGAR <dbl>

Merge 2 dietary index results together

data(NHANES_20152016)
data(NHANES_20172018)

# HEI_NHANES_FPED
## 2017-2018 day 1 and day 2
HEI2020_NHANES_FPED_1718 = HEI2020_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)

## 2015-2016 day 1 and day 2
HEI2020_NHANES_FPED_1516 = HEI2020_NHANES_FPED(
    FPED_PATH=NHANES_20152016$FPED, 
    NUTRIENT_PATH=NHANES_20152016$NUTRIENT, 
    DEMO_PATH=NHANES_20152016$DEMO, 
    FPED_PATH2=NHANES_20152016$FPED2, 
    NUTRIENT_PATH2=NHANES_20152016$NUTRIENT2)

# Now, merge the two datasets
HEI2020_NHANES_FPED_17181516 = rbind(HEI2020_NHANES_FPED_1718, HEI2020_NHANES_FPED_1516)

# Save the result on your computer
# HEI2020_NHANES_FPED_17181516_df = as.data.frame(HEI2020_NHANES_FPED_17181516)
# readr::write_csv(HEI2020_NHANES_FPED_17181516_df, "/your_output_file_location/HEI2020_NHANES_FPED_17181516_df.csv")

Merge dietary index results with other NHANES data

data(NHANES_20172018)

# HEI_NHANES_FPED
## 2017-2018 day 1 and day 2
HEI2020_NHANES_FPED_1718 = HEI2020_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)

# Blood pressure data
## library(haven)
BP_1718 = read_xpt("BPX_J.XPT")

## library(dplyr)
BP_HEI2020_1718 = inner_join(HEI2020_NHANES_FPED_1718, BP_1718, by="SEQN")

Add dietary index output to your own data and save the result

# Store the output of HEI2015 in "HEI2015_output"
data("SERV_DATA_exp")
HEI2015_output = HEI2015(SERV_DATA_exp, SERV_DATA_exp$UserName, SERV_DATA_exp$TOTALKCAL, SERV_DATA_exp$TOTALFRT_SERV_HEI2015_exp, SERV_DATA_exp$FRT_SERV_HEI2015_exp, SERV_DATA_exp$VEG_SERV_HEI2015_exp, SERV_DATA_exp$GREENNBEAN_SERV_HEI2015_exp, SERV_DATA_exp$TOTALPRO_SERV_HEI2015_exp,  SERV_DATA_exp$SEAPLANTPRO_SERV_HEI2015_exp, SERV_DATA_exp$WHOLEGRAIN_SERV_HEI2015_exp, SERV_DATA_exp$DAIRY_SERV_HEI2015_exp, SERV_DATA_exp$FATTYACID_SERV_HEI2015_exp, SERV_DATA_exp$REFINEDGRAIN_SERV_HEI2015_exp,  SERV_DATA_exp$SODIUM_SERV_HEI2015_exp, SERV_DATA_exp$ADDEDSUGAR_SERV_HEI2015_exp, SERV_DATA_exp$SATFAT_SERV_HEI2015_exp)


# Merge the HEI2015_output with your own data by the participant ID
# Here, the HEI2015_output'S participant ID is "RESPONDENTID", while the participant ID in your selected data may vary (SERV_DATA_exp's participant ID UserName) and it should be the column name of SERV_DATA$RESPONDENTID in the HEI2015 function
Merged_HEI2015_output = left_join(SERV_DATA_exp, HEI2015_output, by=c("UserName" = "RESPONDENTID"))

# Save the result on your computer
readr::write_csv(Merged_HEI2015_output, "/your_output_file_location/Merged_HEI2015_output.csv")