Skip to contents

Combines a diet quality criterion with an **absolute** environmental sustainability criterion.

Usage

eiod_hesd(
  biodiversity,
  gdqs,
  group,
  form = c("category", "binary", "components"),
  gdqs_cutoff = 23
)

Arguments

biodiversity

Numeric vector of per capita daily biodiversity loss.

gdqs

Numeric vector of Global Diet Quality Score values.

group

Integer vector of demographic groups 1-8.

form

What to return. `"category"` (default) gives the four categories of Table 5a as a factor; `"binary"` gives 1 for category 1 and 0 otherwise; `"components"` gives a data frame with both sub-indicators and both combined forms.

gdqs_cutoff

GDQS threshold, default 23.

Value

A factor, integer vector, or data frame, depending on `form`.

Details

  • healthy: GDQS >= 23

  • environmentally sustainable: biodiversity loss below the Table 3 absolute threshold

Both criteria are also available on their own, as [eiod_healthy_diet()] and [eiod_sustainable_diet()]. This function calls those two rather than re-implementing them, so the sub-indicators and the composite cannot drift apart.

Age restriction

The methods paper restricts the composite metrics to respondents aged 2 years and older, because the GDQS has not been validated below that age. Table 5a prints six demographic columns, not eight. Results are therefore `NA` for groups 1 and 5, and a message reports how many observations that affects. If your sample includes under-twos, decide explicitly whether they belong in the analysis denominator at all.

Relationship to HDLEI

HESD and [eiod_hdlei()] are nested, not independent: every HDLEI diet is also a HESD diet. See [eiod_low_impact()] for why. Do not present them as two dimensions of a 2x2.

Examples

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

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 

# everything at once
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)
#>   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
#> 5       0   0 Not healthy and not env. sustainable      0
#> 6       0   1     Not healthy but env. sustainable      0