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)
#> 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>