Skip to contents

Compares exposure-response curves and cumulative relative risks across population strata (e.g., age groups, sexes, income quintiles, municipalities) to identify which subgroups are most sensitive to a climate exposure. Takes a named list of climasus_dlnm fits — one per stratum — and extracts the cumulative RR at user-specified hot and cold percentiles for each, producing a ranked comparison table and full stratum-specific ERCs for plotting.

Usage

sus_mod_sensitivity(
  fits,
  hot_percentile = 0.99,
  cold_percentile = 0.01,
  stratum_labels = NULL,
  alpha = 0.05,
  lang = "pt",
  verbose = TRUE
)

Arguments

fits

A named list of climasus_dlnm objects, one per stratum. All fits must use the same climate_col and were produced by sus_mod_dlnm(). If the list is unnamed, strata are labelled "Stratum 1", "Stratum 2", etc.

hot_percentile

Numeric in (0, 1). Quantile of the observed exposure distribution used as the "hot" comparison point. Default: 0.99 (99th percentile — extreme heat). Must be greater than cold_percentile.

cold_percentile

Numeric in (0, 1). Quantile of the observed exposure distribution used as the "cold" comparison point. Default: 0.01 (1st percentile — extreme cold). Must be less than hot_percentile.

stratum_labels

Named character vector or NULL. Custom display labels for the strata, with names matching names(fits). If NULL, the list names are used as-is. Useful for plotting (e.g., c(age_65plus = "65+ years", age_1864 = "18-64 years")).

alpha

Numeric. Significance level for confidence intervals. Default: 0.05.

lang

Character. Language for messages: "pt" (default), "en", "es".

verbose

Logical. Print progress messages. Default TRUE.

Value

A climasus_sensitivity list with:

$rr_table

Tibble with one row per (stratum, component): stratum, label, component ("hot" or "cold"), quantile_prob, exposure, rr, rr_lo, rr_hi, ref_exposure.

$comparison

Tibble ranked by sensitivity_index (descending): one row per stratum with hot_rr, hot_rr_lo, hot_rr_hi, cold_rr, cold_rr_lo, cold_rr_hi, sensitivity_index, hot_rank, cold_rank.

$stratum_curves

Tibble with the full exposure-response curve for each stratum (100-point grid from each $pred): columns stratum, label, exposure, rr, rr_lo, rr_hi. Suitable for overlaid ERC plots.

$meta

List: climate_col, n_strata, stratum_names, hot_percentile, cold_percentile, alpha, call_time.

Statistical framework

For each stratum \(s\) with fitted DLNM \(\hat{f}_s\), the cumulative RR at exposure quantile \(q\) (relative to the stratum's reference \(x_{0,s}\)) is:

$$RR_s(q) = \exp\!\left\{\sum_{l=0}^{L} \left[\hat{f}_s\!\left(F_s^{-1}(q),\, l\right) - \hat{f}_s\!\left(x_{0,s},\, l\right)\right]\right\}$$

where \(F_s^{-1}(q)\) is the \(q\)-th quantile of the observed exposure distribution in stratum \(s\). RRs are extracted by linear interpolation from the pre-computed dlnm::crosspred grid stored in each climasus_dlnm object — no re-fitting or additional dlnm calls are needed.

The sensitivity index for stratum \(s\) is defined as:

$$SI_s = \log RR_s(\texttt{hot\_percentile}) + \log RR_s(\texttt{cold\_percentile})$$

a combined measure of total climate-attributable vulnerability (heat + cold).

References

Baccini, M., et al. (2011). Heat effects on mortality in 15 European cities. Epidemiology, 22(1), 68-77. doi:10.1097/EDE.0b013e3181fdcd5e

Benmarhnia, T., et al. (2015). A difference-in-differences approach to assess the effect of a heat action plan on heat-related mortality, and differences in effectiveness according to sex, age, and socioeconomic status. Environmental Health Perspectives, 124(11), 1694-1699. doi:10.1289/ehp.1510173

Armstrong, B.G., et al. (2017). The role of humidity in associations of high temperature with mortality. Epidemiology, 28(6), 781-789.

Examples

if (FALSE) { # \dontrun{
# Fit separate DLNMs per age group
fits <- list(
  elderly = sus_mod_dlnm(df_65plus, ...),
  adults  = sus_mod_dlnm(df_1864,   ...),
  youth   = sus_mod_dlnm(df_under18, ...)
)

sens <- sus_mod_sensitivity(fits, lang = "pt")
print(sens)          # ranked comparison table
tidy(sens)           # one-row-per-stratum tibble
} # }