help metareg(SJ8-4: sbe23_1) -------------------------------------------------------------------------------

Title

metareg-- Meta-analysis regression (revised)

Syntax

metaregdepvar[indepvars] [if] [in]wsse(varname)[,eformgraphrandomsizenoconstantmmremlebknapphartungztau2testlevel(#)permute(#[,univariabledetailjoint(varlist1[|varlist2...])])logmaximize_options]

bycan be used withmetareg; see[D] by.

Description

metaregperforms random-effects meta-regression using aggregate-level data.From a more abstract perspective, it extends

vwlsby estimating an extra additive component of variance tau2:y_i = a + B*x_i + u_i + e_i

where a is a constant, u_i is a normal error term with known standard deviations wsse_i that may vary across units, and e_i is a normal error with variance tau2 to be estimated, assumed equal across units. This is a similar model to those fit by the

xtcommands, except that the within-unit data have been summarized by an effect estimate and its standard error for each unit i.

Options

wsse(varname)specifies the variable containing the standard error ofdepvarwithin each study (within-studystandarderror). All values ofvarnamemust be greater than zero.wsse()is required.

eformindicates to output the exponentiated form of the coefficients and to suppress reporting of the constant. This option may be useful whendepvaris the logarithm of a ratio measure, such as a log odds-ratio or a log risk-ratio.

graphrequests a line graph of fitted values plotted against the first covariate inindepvars, together with the estimates from each study represented by circles. By default, the circle sizes depend on the precision of each estimate (the inverse of its within-study variance), which is the weight given to each study in the fixed-effects model.

randomsizeis for use with thegraphoption. It specifies that the size of the circles will depend on the weights in the random-effects model rather than the precision of each estimate. These random-effects weights depend on the estimate of tau2.The remaining options will mainly be of interest to more advanced users:

noconstantsuppresses the constant term (intercept). This is rarely appropriate in meta-regression.The

mm,reml, andeboptions are alternatives that specify the method of estimation of the additive (between-study) component of variance tau2.

mmspecifies the use of method of moments to estimate the additive (between-study) component of variance tau2; this is a generalization of the DerSimonian and Laird (1986) method commonly used for random-effects meta-analysis. For speed, this is the default when thepermute()option is specified, because it is the only noniterative method.

remlspecifies the use of residual maximum likelihood (REML) to estimate the additive (between-study) component of variance tau2. This is the default unless thepermute()option is specified. This revised version uses Stata's maximum likelihood facilities to maximize the REML log likelihood. It will therefore not give identical results to the previous version ofmetareg, which used an approximate iterative method.

ebspecifies the use of the "empirical Bayes" method to estimate tau2 (Morris 1983).

knapphartungmakes a modification to the variance of the estimated coefficients suggested by Knapp and Hartung (2003), accompanied by the use of a t distribution in place of the standard normal distribution when calculating p-values and confidence intervals. This is the default unless thepermute()option is specified.

zrequests that theknapphartungmodification not be applied and that the standard normal distribution be used to calculate p-values and confidence intervals. This is the default when thepermute()option is specified with a fixed-effects model.

tau2testadds to the output two tests of tau2 = 0. The first is based on the residual heterogeneity statistic, Q_res. The second (not available if themmoption is also specified) is a likelihood-ratio test based on the REML log likelihood. These are two tests of the same null hypothesis (the fixed-effects model with tau2 = 0), but the alternative hypotheses are different, as are the distributions of the test statistics under the null, so close agreement of the two tests is not guaranteed. Both tests are typically of little interest because it is more helpful to quantify heterogeneity than to test for it.

level(#)specifies the confidence level, as a percentage, for confidence intervals. The default islevel(95)or as set byset level.

permute(...)calculates p-values by using a Monte Carlo permutation test. See Option for permutation test for more information about the option.

logrequests the display of the iteration log during estimation of tau2. This is ignored if themmoption is specified, because this uses a noniterative method.

maximize_optionsare ignored unless estimation of tau2 is by REML. These options control the maximization process; seemaximize. You should never need to specify them; they are supported only in case problems in the REML estimation of tau2 are ever reported or suspected.

The

permute()option calculates p-values by using a Monte Carlo permutation test, as recommended by Higgins and Thompson (2004). To address multiple testing,permute()also calculates p-values for the most- to least-significant covariates, as the same authors also recommend.The syntax of

permute()is

permute(#[,univariabledetailjoint(varlist1[|varlist2...])])where

#is required and specifies the number of random permutations to perform. Larger values give more precise p-values but take longer.There are three suboptions:

univariableindicates that p-values should be calculated for a series of single covariate meta-regressions of each covariate invarlistseparately, instead of a multiple meta-regression of all covariates invarlistsimultaneously.

detailrequests more detailed output in the style given bypermute.

joint(varlist1[|varlist2...])specifies that a permutation p-value should also be computed for a joint test of the variables in each varlist.The

eform,level(), andzoptions have no effect when thepermute()option is specified.

Syntax of predictThe syntax of

predictfollowingmetaregis

predict[type]newvar[if] [in] [,statistic]where

statisticis

xbfitted values; the defaultstdpstandard error of the predictionstdfstandard error of the forecastupredicted random effectsustandardstandardized predicted random effectsxbuprediction including random effectsstdxbustandard error of xbuhatleverage (diagonal elements of hat matrix)These statistics are available both in and out of sample; type

predict... if e(sample) ...if wanted only for the estimation sample.

Options for predict

xb, the default, calculates the linear prediction, x_i*b, that is, the fitted values excluding the random effects.

stdpcalculates the standard error of the prediction (the standard error of the fitted values excluding the random effects).

stdfcalculates the standard error of the forecast. This gives the standard deviation of the predicted distribution of the true value ofdepvarin a future study, with the covariates given byvarlist. stdf^2 = stdp^2 + tau2.

ucalculates the predicted random effects, u_i. These are the best linear unbiased predictions of the random effects, also known as the empirical Bayes (or posterior mean) estimates of the random effects, or as shrunken residuals.

ustandardcalculates the standardized predicted random effects, i.e., the predicted random effects, u_i, divided by their (unconditional) standard errors. These may be useful for diagnostics and model checking.

xbucalculates the prediction including random effects, a + B*x_i + u_i, also known as the empirical Bayes estimates of the effects for each study.

stdxbucalculates the standard error of the prediction including random effects.

hatcalculates the leverages (the diagonal elements of the projection hat matrix).

Saved resultsWhen the

permute()option is not specified,metaregsaves the following ine():Scalars

e(N)number of observationse(df_m)model degrees of freedome(df_Q)degrees of freedom for test of Q=0e(df_r)residual degrees of freedom (if t tests used)e(remll)REML log likelihoode(chi2_c)chi^2 for comparison teste(F)model F statistice(tau2)estimate of tau2e(Q)Cochran's Qe(I2)I-squarede(q_KH)Knapp-Hartung variance modification factore(remll_c)REML log likelihood, comparison modele(tau2_0)tau2, constant-only modele(chi2)model chi^2Macros

e(cmd)metarege(predict)program used to implementpredicte(wsse)name ofwsse()variablee(depvar)name of dependent variablee(method)REML,Method of moments, orEmpirical Bayese(properties)b VMatrices

e(b)coefficient vectore(V)variance-covariance matrix of estimatorsFunctions

e(sample)marks estimation sample

Examples

. metareg logrr latitude, wsse(selogrr) eform

. metareg logrr latitude, wsse(selogrr) graph

. metareg smd abstract duration itt, wsse(sesmd) permute(10000)

. metareg smd abstract duration itt, wsse(sesmd) permute(1000,univariable)

. xi: metareg logor i.group, wsse(selogor) permute(1000, joint(i.group))

Note

metaregis programmed as a Stata estimation command and so supports many of the commands listed underestcomandpostest(except when thepermute()option is used). One deliberate exception islrtest, which is not appropriate aftermetareg(because the REML log likelihood cannot be used to compare models with different fixed effects, while the method of moments is not based on a likelihood). For this reason, when the REML method is used, the iteration log showing the log likelihood is suppressed by default; specify thelogoption if you wish to see it.

ReferencesDerSimonian, R., and N. Laird. 1986. Meta analysis in clinical trials.

Controlled Clinical Trials7: 177-188.Higgins, J. P. T, and S. G. Thompson. 2004. Controlling the risk of spurious findings from meta-regression.

Statistics in Medicine23: 1663-1682.Knapp, G., and J. Hartung. 2003. Improved tests for a random effects meta-regression with a single covariate.

Statistics in Medicine22: 2693-2710.Morris, C. N. 1983. Parametric empirical Bayes inference: Theory and applications.

Journal of the American Statistical Association78: 47-55.Sharp, S. 1998. sbe23: Meta-analysis regression.

Stata Technical Bulletin42: 16-22. Reprinted inStata Technical Bulletin Reprints, vol. 7, pp. 148-155. College Station, TX: Stata Press.

AuthorRoger M. Harbord Department of Social Medicine University of Bristol, UK roger.harbord@bristol.ac.uk

AcknowledgmentsThis is a substantial revision of the original version of

metaregwritten by Stephen Sharp (1998), who gave his permission to release this version under the same name and to incorporate his code. Julian Higgins gave advice on the permutation test. Aijing Shang tested early versions and made helpful suggestions. Portions of the new code borrow ideas from official Stata commands such asnbreg, and I thank StataCorp for making such code visible to the user.A dialog box, written by Thomas J. Steichen, is available for the original version of the

metaregcommand.

Also seeArticle:

Stata Journal, volume 8, number 4: sbe23_1,Stata Technical Bulletin42: sbe23Manual:

[R] meta,[R] permuteOnline:

[R] vwls,[R] permute,meta(if installed),metan(if installed), meta_dialog (if installed)