Skip to contents

The question: is this diet both healthy and environmentally sound?

Both composites combine a diet quality criterion (GDQS ≥ 23) with an environmental criterion. They differ only in the second:

Table Diet quality Environment
HESD — healthy, environmentally sustainable diet 5a GDQS ≥ 23 biodiversity below the absolute Table 3 threshold
HDLEI — healthy diet, low environmental impact 5b GDQS ≥ 23 biodiversity below the relative P30

Neither composite defines a new cut-off. They call eiod_absolute_threshold() and eiod_relative_band() internally, so there is no second copy of any number anywhere in the package.

grp <- eiod_age_sex_group(eiod_demo$age, eiod_demo$sex)

reiod does not calculate the GDQS. You supply it.

A. One respondent

# 40-year-old man, GDQS 28, biodiversity 5e-13 PDF*year
eiod_hesd(biodiversity = 5e-13, gdqs = 28, group = 4)
#> [1] Healthy and env. sustainable
#> 4 Levels: Healthy and env. sustainable ... Not healthy and not env. sustainable
eiod_hdlei(biodiversity = 5e-13, gdqs = 28, group = 4)
#> [1] Healthy with low env. impacts
#> 4 Levels: Healthy with low env. impacts ... Not healthy and not low env. impacts

B. Vectors from your data

table(eiod_hesd(eiod_demo$biodiv_pdf, eiod_demo$gdqs, grp))
#> 15 observation(s) aged under 2 years set to NA: the GDQS is not validated below age 2, so the HESD metric does not apply to them.
#> 
#>         Healthy and env. sustainable     Not healthy but env. sustainable 
#>                                  206                                  125 
#>     Healthy but not env. sustainable Not healthy and not env. sustainable 
#>                                  124                                  110

Note the message about respondents under 2 years. The methods paper restricts the composites to ages 2 and over, because the GDQS has not been validated below that age — Table 5a prints six demographic columns, not eight. If your sample includes under-twos, decide explicitly whether they belong in the denominator, because it changes every percentage you report.

C. The two criteria separately

Usually what you want for reporting:

parts <- eiod_hesd(eiod_demo$biodiv_pdf, eiod_demo$gdqs, grp,
                   form = "components")
#> 15 observation(s) aged under 2 years set to NA: the GDQS is not validated below age 2, so the HESD metric does not apply to them.
head(parts, 4)
#>   healthy env                         category binary
#> 1       1   0 Healthy but not env. sustainable      0
#> 2       0   1 Not healthy but env. sustainable      0
#> 3       1   1     Healthy and env. sustainable      1
#> 4       1   1     Healthy and env. sustainable      1

healthy and env are the two sub-indicators; category is the four-way Table 5a classification; binary is category 1 against everything else. The sub-indicators come from eiod_healthy_diet() and eiod_sustainable_diet(), which are exported so you can report either on its own:

round(100 * c(
  healthy     = mean(eiod_healthy_diet(eiod_demo$gdqs), na.rm = TRUE),
  sustainable = mean(eiod_sustainable_diet(eiod_demo$biodiv_pdf, grp),
                     na.rm = TRUE),
  low_impact  = mean(eiod_low_impact(eiod_demo$biodiv_pdf, grp), na.rm = TRUE)
), 1)
#>     healthy sustainable  low_impact 
#>        59.1        57.1        41.2

D. Adding both to a data frame

d <- eiod_demo
d$group <- eiod_age_sex_group(d$age, d$sex)
d$hesd  <- eiod_hesd(d$biodiv_pdf,  d$gdqs, d$group, form = "binary")
#> 15 observation(s) aged under 2 years set to NA: the GDQS is not validated below age 2, so the HESD metric does not apply to them.
d$hdlei <- eiod_hdlei(d$biodiv_pdf, d$gdqs, d$group, form = "binary")
#> 15 observation(s) aged under 2 years set to NA: the GDQS is not validated below age 2, so the HDLEI metric does not apply to them.

head(d[, c("id", "group", "gdqs", "biodiv_pdf", "hesd", "hdlei")], 5)
#>   id group gdqs   biodiv_pdf hesd hdlei
#> 1  1     4 26.7 1.670692e-12    0     0
#> 2  2     4 18.4 5.547457e-13    0     0
#> 3  3     4 35.0 9.416969e-13    1     0
#> 4  4     4 37.1 2.538843e-13    1     1
#> 5  5     8 17.3 6.225413e-12    0     0

The thing to know before reporting these: HDLEI is nested inside HESD

table(HESD = d$hesd, HDLEI = d$hdlei, useNA = "ifany")
#>       HDLEI
#> HESD     0   1 <NA>
#>   0    359   0    0
#>   1     61 145    0
#>   <NA>   0   0   35

The empty cell is structural, not a quirk of this sample. For biodiversity the relative P30 cut-off sits below the absolute threshold in every demographic group, by the same constant factor:

vapply(1:8, function(g) {
  unname(eiod_lookup_cutoff("biodiv", g, "abs")) /
    unname(eiod_lookup_cutoff("biodiv", g, "rel", 30))
}, numeric(1))
#> [1] 1.522473 1.522473 1.522473 1.522473 1.522473 1.522473 1.522473 1.522473

Both are the same all-population figure scaled by the same energy-requirement weight, so the ratio is constant by construction. Every HDLEI diet is therefore also a HESD diet, and HESD prevalence can never fall below HDLEI prevalence.

Reporting both is still informative — the gap between them is the share of diets sitting between the two cut-offs — but they are not two independent dimensions and must not be presented as a 2×2.

Only one indicator is involved

Unlike Tables 3 and 4, the composites use biodiversity only. There is no subset to choose and no batch form, because there is nothing to batch: the paper defines these two metrics on that one indicator.

See also