Skip to contents

Calculate the MEDI (serving size-based) using a binary cutoff for the NHANES_FPED data (after 2005) within 1 step

Usage

MEDI_NHANES_FPED(
  FPED_IND_PATH = NULL,
  NUTRIENT_IND_PATH = NULL,
  FPED_IND_PATH2 = NULL,
  NUTRIENT_IND_PATH2 = NULL,
  SWEETS_code = NULL,
  FAT_OIL_code = NULL,
  SSB_code = NULL,
  OLIVE_OIL_code = NULL
)

Arguments

FPED_IND_PATH

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

NUTRIENT_IND_PATH

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

FPED_IND_PATH2

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

NUTRIENT_IND_PATH2

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

SWEETS_code

The code for sweets in the FPED data. The default food codes are from the FPED data for NHANES 2017-2018

FAT_OIL_code

The code for fat and oil in the FPED data. The default food codes are from the FPED data for NHANES 2017-2018

SSB_code

The code for sugar-sweetened beverages in the FPED data. The default food codes are from the FPED data for NHANES 2017-2018

OLIVE_OIL_code

The code for olive oil in the FPED data. The default food codes are from the FPED data for NHANES 2017-2018

Value

The MEDI and its component scores and serving sizes

Examples

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>