
Meta-Regression of Pooled DLNM Estimates with City-Level Covariates
Source:R/sus_mod_metaregression.R
sus_mod_metaregression.RdExtends 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_dlnmobjects, one per city or region. All fits must use the sameclimate_col,lag_max,argvar, andarglag. Produced bysus_mod_dlnm().- covariates
A
data.framewith one row per city and city-level predictors. City names must be stored as row names (default) or in the column specified bycity_col. Cities present infitsbut absent incovariatesare excluded from the meta-regression with a warning.- covariate_cols
Character vector of column names to use as meta-regression predictors. Default
NULLuses all numeric columns incovariates(after removing the city identifier column if any).- city_col
Character. Name of the column in
covariatesthat holds city identifiers. DefaultNULLuses row names ofcovariates.- 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.
mvmetaestimation 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_fitThe
mvmetamodel with covariates.$null_fitIntercept-only
mvmetamodel (for heterogeneity comparison).$pooled_preddlnm::crosspredfor the average city (all standardized covariates = 0, i.e., the intercept).$blup_predsNamed list of per-city BLUP
crosspredobjects (whenblup = TRUE).$city_tableTibble: one row per city with raw and BLUP RRs at the 75th percentile exposure.
$covariate_testsTibble: one row per covariate with Wald chi-square statistic (df =
n_crossbasis_coef) and p-value.$heterogeneityTibble comparing null and full-model heterogeneity: Cochran Q, df, p-value, I^2, and proportion of heterogeneity explained by covariates (R^2_het).
$cov_scalesTibble with the mean and SD used to standardize each covariate (for back-transformation).
$metaMetadata:
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)
} # }