Skip to contents

Calculate the MED for the ASA24 data within 1 step

Usage

MED_ASA24(DATA_PATH, RECALL_SUMMARIZE = TRUE)

Arguments

DATA_PATH

The file path for the data. The file name should be like: Totals.csv.

RECALL_SUMMARIZE

Whether to summarize the food group and nutrient intake over all days reported per individual per day. Default is TRUE.

Value

The MED and its component scores

Examples

data("ASA24_exp")
MED_ASA24(ASA24_exp, RECALL_SUMMARIZE = TRUE)
#> [1] "RECALL_SUMMARIZE = TRUE, summarizing HEI2015 for ASA24 data by averaging over all possible recalls per person per day..."
#> [1] "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-…       7          7       1       1          1           1
#>  3        3 f0115426-…       7          7       1       1          1           1
#>  4        4 337d84a7-…       7          7       1       1          1           1
#>  5        5 998f098a-…       7          7       1       1          1           1
#>  6        6 aae330db-…       7          7       1       1          1           1
#>  7        7 76e0f3e1-…       7          7       1       1          1           1
#>  8        8 24de994f-…       8          7       1       1          1           1
#>  9        9 8f61ae64-…       7          7       1       1          1           1
#> 10       10 b47ab1b8-…       7          7       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>