Skip to contents

Calculate the Dietary Inflammation Index (DII) for the DHQ3 data within 1 step

Usage

DII_DHQ3(DATA_PATH)

Arguments

DATA_PATH

The file path for the data. The data is Total Daily Results file, ending with results.csv

Value

The DII and its component scores

Examples

data("DHQ3_exp")
DII_DHQ3(DHQ3_exp)
#> 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: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> Warning: Unknown or uninitialised column: `EUGENOL_DII`.
#> # A tibble: 23 × 49
#> # Groups:   Respondent ID [23]
#>    `Respondent ID` DII_ALL DII_NOETOH REPEATNUM ALCOHOL_DII VITB12_DII VITB6_DII
#>              <dbl>   <dbl>      <dbl>     <dbl>       <dbl>      <dbl>     <dbl>
#>  1               1  -2.22     -2.50           1       0.278    -0.0232   -0.207 
#>  2               2   0.290     0.0119         1       0.278    -0.0855    0.0157
#>  3               3  -3.23     -3.50           1       0.270    -0.0361   -0.348 
#>  4               4   1.43      1.15           1       0.278    -0.0486   -0.210 
#>  5               5   2.95      2.72           1       0.234    -0.0760    0.119 
#>  6               6   3.53      3.26           1       0.278    -0.0949    0.265 
#>  7               7   2.29      2.01           1       0.278    -0.0869    0.157 
#>  8               8   0.310     0.0356         1       0.274    -0.0574   -0.229 
#>  9               9   3.07      2.91           1       0.153    -0.0682    0.0157
#> 10              10   0.199    -0.0782         1       0.277    -0.0297   -0.0778
#> # ℹ 13 more rows
#> # ℹ 42 more variables: BCAROTENE_DII <dbl>, 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 <int>, GINGER_DII <int>,
#> #   IRON_DII <dbl>, MG_DII <dbl>, MUFA_DII <dbl>, NIACIN_DII <dbl>,
#> #   N3FAT_DII <dbl>, N6FAT_DII <dbl>, ONION_DII <int>, PROTEIN_DII <dbl>,
#> #   PUFA_DII <dbl>, RIBOFLAVIN_DII <dbl>, SAFFRON_DII <int>, …