Meta-regression extends the random-effects model by adding study-level covariates as predictors of the effect size, allowing you to quantify how much of the between-study heterogeneity each variable explains. The pipeline fits five univariable models (one per moderator) and a single multivariable model, all usingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/namakala/inappropriate-acid-suppressor-agent-use/llms.txt
Use this file to discover all available pages before exploring further.
metafor::rma() on the logit-transformed prevalence. Targets for the univariable models are generated automatically via tar_map(); the multivariable model is a single named target.
Univariable meta-regression
fitMetareg() in src/R/meta-analysis.R handles both the univariable and multivariable cases through a single function:
- Drops rows with infinite sampling variance (
var_logit_prevalence == Inf) — these arise when a study reports a prevalence of exactly 0 or 1. - Removes any remaining rows with
NAin the outcome or the moderator columns viana.omit(). - Builds a one-sided formula from
varname; a single string produces~ Age, while a vector produces~ Year + JBI_Classification + .... - Passes logit prevalence as the outcome (
yi) and its sampling variance (vi) tometafor::rma()withmethod = "REML".
uni_vars used for subgroup analysis:
_targets.R expands these into individual targets with tar_map():
mod_metareg_Age, mod_metareg_Continent, mod_metareg_Setting, mod_metareg_JBI_Classification, and mod_metareg_use_guideline.
Multivariable meta-regression
The multivariable model includes all predictors believed to drive heterogeneity, specified inmv_vars:
fitMetareg() detects length(varname) > 1, it builds the formula ~ Year + JBI_Classification + use_guideline + Setting + Continent + Sample_size automatically — no separate function is needed. The multivariable model jointly estimates the contribution of each predictor while adjusting for the others, and the residual I² indicates how much heterogeneity remains unexplained.
Accessing results
Interpreting meta-regression output
metafor::rma() returns a rma object. The summary() output reports:
| Field | Interpretation |
|---|---|
b (intercept) | Expected logit prevalence when all moderators are 0 / reference level |
b (slope) | Change in logit prevalence per unit increase in the moderator |
se, zval, pval | Standard error, z-statistic, and two-sided p-value for each coefficient |
R2 | Proportion of τ² explained by the moderator(s) |
I2 | Residual heterogeneity after accounting for moderators |
tau2 | Residual between-study variance |
The outcome variable is logit-transformed prevalence. Regression coefficients are therefore on the logit scale. To convert a predicted value back to a probability, apply Slopes represent additive shifts on the logit scale; for small effects you can approximate the change in probability, but for large coefficients use
plogis():plogis() evaluated at specific covariate values.