Skip to contents

Extends two-stage multivariate meta-analysis (sus_mod_pool()) by including city-level covariates (e.g., mean temperature, poverty index, age structure) to explain between-city heterogeneity in climate-health associations. Covariates are automatically standardized to mean 0, SD 1 so the intercept represents the predicted association for an "average city". Returns covariate Wald tests, residual heterogeneity statistics, and BLUP predictions per city adjusted for covariate information.

Usage

sus_mod_metaregression(
  fits,
  covariates,
  covariate_cols = NULL,
  city_col = NULL,
  pred_at = c(0.75, 0.9, 0.95, 0.99),
  blup = TRUE,
  method = "reml",
  alpha = 0.05,
  lang = "pt",
  verbose = TRUE
)

Arguments

fits

A named list of climasus_dlnm objects, one per city or region. All fits must use the same climate_col, lag_max, argvar, and arglag. Produced by sus_mod_dlnm().

covariates

A data.frame with one row per city and city-level predictors. City names must be stored as row names (default) or in the column specified by city_col. Cities present in fits but absent in covariates are excluded from the meta-regression with a warning.

covariate_cols

Character vector of column names to use as meta-regression predictors. Default NULL uses all numeric columns in covariates (after removing the city identifier column if any).

city_col

Character. Name of the column in covariates that holds city identifiers. Default NULL uses row names of covariates.

pred_at

Numeric vector of quantile probabilities (0–1) for the exposure-response summary table. Default c(0.75, 0.90, 0.95, 0.99).

blup

Logical. Compute BLUP city-specific predictions? Default TRUE.

method

Character. mvmeta estimation method: "reml" (default), "ml", or "fixed".

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_metaregression list with:

$mvmeta_fit

The mvmeta model with covariates.

$null_fit

Intercept-only mvmeta model (for heterogeneity comparison).

$pooled_pred

dlnm::crosspred for the average city (all standardized covariates = 0, i.e., the intercept).

$blup_preds

Named list of per-city BLUP crosspred objects (when blup = TRUE).

$city_table

Tibble: one row per city with raw and BLUP RRs at the 75th percentile exposure.

$covariate_tests

Tibble: one row per covariate with Wald chi-square statistic (df = n_crossbasis_coef) and p-value.

$heterogeneity

Tibble comparing null and full-model heterogeneity: Cochran Q, df, p-value, I^2, and proportion of heterogeneity explained by covariates (R^2_het).

$cov_scales

Tibble with the mean and SD used to standardize each covariate (for back-transformation).

$meta

Metadata: climate_col, outcome_col, lag_max, n_cities, city_names, covariate_cols, method, alpha, call_time.

Statistical framework

Let \(\boldsymbol{\theta}_i\) be the \(p\)-dimensional vector of cross-basis coefficients for city \(i\), with variance-covariance matrix \(S_i\). The meta-regression model is:

$$\boldsymbol{\theta}_i \sim N\!\left(\boldsymbol{B}_0 + \sum_{j=1}^{k} \boldsymbol{B}_j x_{ij}, S_i + \Psi\right)$$

where \(\boldsymbol{B}_j\) is the \(p\)-vector of regression coefficients for covariate \(j\) and \(\Psi\) is the residual between-city covariance estimated by REML. Because covariates are standardized before fitting, \(\boldsymbol{B}_0\) is the predicted association for a city with mean covariate values.

The significance of each covariate is assessed by a multivariate Wald test: $$W_j = \hat{\boldsymbol{B}}_j^{\top} \hat{V}_j^{-1} \hat{\boldsymbol{B}}_j \;\sim\; \chi^2_p$$

where \(\hat{V}_j\) is the estimated covariance of \(\hat{\boldsymbol{B}}_j\).

References

Gasparrini, A., et al. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839. doi:10.1002/sim.5471

Berkey, C.S., et al. (1998). Meta-analysis of multiple outcomes by regression with random effects. Statistics in Medicine, 17(22), 2537-2550.

Examples

if (FALSE) { # \dontrun{
# City-level covariates: mean annual temperature and poverty index
city_meta <- data.frame(
  mean_temp  = c(28.5, 22.1, 19.8),
  poverty_pct = c(42, 28, 15),
  row.names  = c("fortaleza", "belo_horizonte", "curitiba")
)

mr <- sus_mod_metaregression(fits, city_meta, lang = "en")
print(mr)
tidy(mr)
} # }