Random-effects meta-regression model with one study-level covariate

Writes the effect estimate of study i as a point on a regression line in the covariate x_i plus two error terms, the study's deviation u_i from the line, with u_i ~ N(0, tau2), and its sampling error e_i, with e_i ~ N(0, v_i) and v_i treated as known. The slope beta_1 is the change in the expected effect per unit increase in x_i, and tau2 is the residual between-study variance not accounted for by the covariate. A fixed-effect meta-regression omits u_i, so sampling error is the only random variation. Further covariates enter as further terms, with a categorical characteristic of J groups coded as J minus 1 dummy variables.

Signature

y_i = beta_0 + beta_1 * x_i + u_i + e_i
Inputs
InputsDefinitionUnit
beta_0Expected effect when the covariate equals zero. With an uncentred covariate this point may lie outside the range of the studiesthe effect scale
beta_1Change in the expected effect per unit increase in the covariate, the interaction between treatment effect and study characteristicthe effect scale per unit of x_i
x_iValue of the study characteristic for study i, such as dose, follow-up length, the mean age of participants or the baseline log-odds of the eventthat of the characteristic
u_iDifference between the true effect of study i and the regression line, normally distributed with mean 0 and variance tau2the effect scale
e_iDifference between the estimate y_i and the true effect of study i, normally distributed with mean 0 and variance v_ithe effect scale
Output
y_iEffect estimate reported by study i, such as a mean difference, log odds ratio or log risk ratiothe chosen effect scale, on the log scale for a ratio measure
  • tau2 Variance of the u_i, the heterogeneity among true effects that the covariate does not account for; zero in a fixed-effect meta-regression (the squared effect scale)
  • v_i Sampling variance of y_i, the square of its standard error, treated as known (the squared effect scale)

Function

Precision-weighted regression of study effect estimates on study characteristics

Maps the effect estimate y_i of each study in a meta-analysis, its within-study variance v_i and the study's value x_i of a characteristic such as dose, mean age or baseline risk to a regression line for the expected effect, together with the between-study variance tau2 that the characteristic leaves unexplained. Studies are weighted by the precision of their estimates, and the random-effects form adds the residual between-study variance to each study's own variance. Ratio measures enter as natural logarithms. In health technology assessment the fitted line gives the relative effect expected for the decision population instead of the average over the trials, and the slope is an association between studies, not a randomised comparison.

Try this function

Implementations

  • Excel

    Weighted least squares slope and intercept of a meta-regression from three ranges

    With the study estimates in a range named StudyEst, the covariate values in a range named Covariate and the weights of HE-FM-MREG-002 in a range named W, the first formula returns beta_1 and the second beta_0, with the first result held in a cell named Slope. SUMPRODUCT evaluates the array arithmetic without an array entry.

    =SUMPRODUCT(W,Covariate-SUMPRODUCT(W,Covariate)/SUM(W),StudyEst)/SUMPRODUCT(W,(Covariate-SUMPRODUCT(W,Covariate)/SUM(W))^2); =SUMPRODUCT(W,StudyEst)/SUM(W)-Slope*SUMPRODUCT(W,Covariate)/SUM(W)

Assumptions

  • Known within-study variances on an approximately normal effect scale

    Each y_i is approximately normally distributed with a variance v_i that is treated as known. The Cochrane Handbook advises that a ratio measure always enters the regression as its logarithm, so that the exponential of beta_1 is the relative change in the effect per unit of the covariate (HE-FM-MREG-004).

  • Linear covariate relation with normal residual heterogeneity

    The true effects lie around a line that is linear in x_i on the chosen scale, with normally distributed deviations of variance tau2. The model is usually fitted in two steps, first estimating tau2 and then estimating beta_0 and beta_1 by weighted least squares with the weights of HE-FM-MREG-002. Treating the estimate of tau2 as known makes the standard errors too small, and the Knapp and Hartung adjustment, which bases tests on a t distribution with k minus p degrees of freedom for k studies and p coefficients, gives error rates closer to nominal.

  • Enough studies and pre-specified covariates for a meta-regression

    The Cochrane Handbook says meta-regression should generally not be considered with fewer than ten studies, cites typical advice of at least ten studies for each characteristic modelled, and asks for a small number of characteristics pre-specified in the protocol with a scientific rationale for each. Participants are randomised within trials but not between them, so beta_1 describes an observational association across studies.

Worked examples

  • Meta-regression line plus residual terms for one illustrative trial

    The article's illustrative fit on the baseline log-odds of the event has a slope of 0.30 and an effect of -0.40 at the trials' mean log-odds of -1.70, which corresponds to an intercept beta_0 of 0.11 at a log-odds of zero. A trial at the mean whose true log odds ratio lies 0.10 below the line and whose sampling error is +0.05 reports a log odds ratio of -0.45. The deviation and error values are illustrative.

    beta_0 = 0.11; beta_1 = 0.30; x_i = -1.70; u_i = -0.10; e_i = 0.05; y_i = -0.45
  • Meta-regression line at a decision population's baseline log-odds

    For a population with a baseline risk of 5%, a log-odds of about -2.944, the line with both error terms set to zero gives an expected log odds ratio of about -0.7732, an odds ratio of about 0.462. The value matches the centred form in HE-FM-MREG-005, as it must.

    beta_0 = 0.11; beta_1 = 0.30; x_i = -2.944; u_i = 0; e_i = 0; y_i = -0.7732

Common errors

  • Fitting a fixed-effect meta-regression by default

    Omitting u_i treats all variation around the line as sampling error. The Cochrane Handbook generally prefers a random-effects model for comparing groups of studies because a fixed-effect comparison carries a high risk of false-positive results, and in the TSD 3 example on BCG vaccine trials and latitude the fixed-effect model fitted very poorly, with a posterior mean residual deviance of 40 against 26 data points.

  • Regressing effects on the observed comparator group risk

    The observed risk in each study's comparator group is part of its effect estimate, so a risk that is high by chance tends to come with a larger effect. The Cochrane Handbook calls the result a false correlation from regression to the mean, and TSD 3 instead uses the true baseline, estimated with its uncertainty in a Bayesian model, as the covariate.

  • Reading a trial-level slope as a patient-level relationship

    When a patient characteristic such as age enters only as a study mean, a strong relationship within each trial can be invisible across trials with similar mean ages, and the direction across studies can even be the opposite of the direction within them. Geissbühler and colleagues found 53 of 81 aggregate-data meta-regressions (65%) susceptible to this ecological fallacy.

Sources

  • Mixed-effects meta-regression model and two-step fitting in metafor

    Viechtbauer W. Conducting meta-analyses in R with the metafor package. Journal of Statistical Software. 2010;36(3). Section 2.2 (mixed-effects model with u_i ~ N(0, tau2) and residual heterogeneity not accounted for by the moderators), section 2.4 (two-step fitting with weighted least squares) and section 3.3 (Knapp and Hartung adjustment with a t distribution on k minus p degrees of freedom).

    View source →

  • Meta-regression model choice and cautions in the Cochrane Handbook

    Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA (editors). Chapter 10, Analysing data and undertaking meta-analyses, in Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane; 2024. Section 10.11.3.1 (random-effects model preferred for comparing subgroups), section 10.11.4 (effect estimate as outcome, precision weighting, residual heterogeneity, log scale for ratio measures, dummy variables, fewer than ten studies), sections 10.11.5.1 to 10.11.5.5 (pre-specification and aggregation bias), 10.11.6 (observational nature) and 10.11.7 (comparator group risk and regression to the mean).

    View source →

  • Random-effects meta-regression and baseline risk in NICE DSU TSD 3

    Dias S, Sutton AJ, Welton NJ, Ades AE. NICE DSU Technical Support Document 3, Heterogeneity, subgroups, meta-regression, bias and bias-adjustment. Decision Support Unit; 2011, last updated April 2012. Section 1.1 (aim of meta-regression and spurious significance with few precise trials), section 4.3.1 (BCG vaccine example in which the fixed-effect model fitted very poorly) and section 4.4 (regression on the true baseline rather than the observed baseline risk).

    View source →

  • Frequency of ecological fallacy in published meta-regressions

    Geissbühler M, Hincapié CA, Aghlmandi S, Zwahlen M, Jüni P, da Costa BR. Most published meta-regression analyses based on aggregate data suffer from methodological pitfalls, a meta-epidemiological study. BMC Medical Research Methodology. 2021;21, article 123. Abstract and results, 57 of 81 aggregate-data meta-regressions with at least one pitfall, 53 susceptible to ecological fallacy.

    View source →

Canonical Identity

Stable URI · Machine-readable · Resolvable · CC BY 4.0