------------------------------------------------------------------------------- help formetan,labbe-------------------------------------------------------------------------------

Fixed and random effects meta-analysis

metanvarlist[ifexp] [inrange] [weight] [,measure_and_model_optionsoptions_for_continuous_dataoutput_optionsforest_plot_options]where

measure_and_model_optionsmay be

orrrrdfixedrandomfixedipetocornfieldchi2breslownointegercc(#)wgt(weightvar)second(modelorestimates anddescription)first(estimates and description)and where

options_for_continuous_datamay be

cohenhedgesglassnostandardfixedrandomand where

output_optionsmay be

by(byvar)nosubgroupsgweightlogeformefficacyilevel(#)olevel(#)sortby(varlist)label(namevar yearvar)nokeepnotablenographnosecsuband where

forest_plot_optionsmay be

legend(string)xlabel(#,...)xtick(#,...)boxsca(#)noboxnooverallnowtnostatsgroup1(string)group2(string)effect(string)force...with further

forest_plot_optionsin the version 9 update

lcols(varlist)rcols(varlist)astext(#)doublenohetsummaryonlyrfdistrflevel(#)null(#)nullofffavours(string#string)firststats(string)secondstats(string)boxopt()diamopt()pointopt()ciopt()olineopt()classicnowarninggraph_options

labbevarlist[ifexp] [inrange] [weight] [,nowtpercentor(#)rr(#)rd(#)nulllogitwgt(weightvar)symbol(symbolstyle)nolegendid(idvar)textsize(#)clockvar(clockvar)gap(#)graph_options

DescriptionThese routines provide facilities to conduct meta-analyses of data from more than one study and to graph the results. Either binary (event) or continuous data from two groups may be combined using the

metancommand. Additionally, intervention effect estimates with corresponding standard errors or confidence intervals may be meta-analysed. Several meta-analytic methods are available, and the results may be displayed graphically in a Forest plot. A test of whether the summary effect measure is equal to the null is given, as well as a test for heterogeneity, i.e., whether the true effect in all studies is the same. Heterogeneity is also quantified using the I-squared measure (Higgins et al 2003).

metan(the main meta-analysis routine) requires either two, three, four or six variables to be declared. When four variables are specified these correspond to the number of events and non-events in the experimental group followed by those of the control group, and analysis of binary data is performed on the 2x2 table. With six variables, the data are assumed continuous and to be the sample size, mean and standard deviation of the experimental group followed by those of the control group. If three variables are specified these are assumed to be the effect estimate and its lower and upper confidence interval, and it is suggested that these are log transformed for odds ratios or risk ratios and theeformoption used. If two variables are specified these are assumed to be the effect estimate and standard error; again, it is recommended that odds ratios or risk ratios are log transformed.

labbedraws a L'Abbe plot for event data (proportion of successes in the two groups). This is an alternative to the graph produced bymetan8.Note that the

metancommand now requires Stata version 9 and has been updated with several new options. Changes are mainly to graphics options which are collected in the sectionFurther options in the v9 update formetan: Forest plot, or otherwise markedv9 update. The previous version is still available under the name -metan7-

Remarks on funnel (discontinued)The

metafunnelcommand has more options for funnel plots and version 8 graphics; as suchfunnelhas been removed. See metafunnel (if installed)

Options for metan+----------------------------------+ ----+ Specifying the measure and model +---------------------------------

These options apply to binary data.

rrpools risk ratios (the default).

orpools odds ratios.

rdpools risk differences.

fixedspecifies a fixed effect model using the method of Mantel and Haenszel (the default).

fixedispecifies a fixed effect model using the inverse variance method.

petospecifies that Peto's method is used to pool odds ratios.

randomspecifies a random effects model using the method of DerSimonian & Laird, with the estimate of heterogeneity being taken from the from the Mantel-Haenszel model.

randomispecifies a random effects model using the method of DerSimonian & Laird, with the estimate of heterogeneity being taken from the inverse-variance fixed-effect model.

cornfieldcomputes confidence intervals for odds ratios by method of Cornfield, rather than the (default) Woolf method.

chi2displays chi-squared statistic (instead of z) for the test of significance of the pooled effect size. This is available only for odds ratios pooled using Peto or Mantel-Haenszel methods.

breslowproduces Breslow-Day test for homogeneity of ORs.

cc(#)defines a fixed continuity correction to add in the case where a study contains a zero cell. By default,metan8adds 0.5 to each cell of a trial where a zero is encountered when using Inverse-Variance, Der-Simonian & Laird or Mantel-Haenszel weighting to enable finite variance estimators to be derived. However, thecc()option allows the use of other constants (including none). See also thenointegeroption.

nointegerallows the cell counts to be non-integers. This may be useful when a variable continuity correction is sought for studies containing zero cells, but also may be used in other circumstances, such as where a cluster-randomised trial is to be incorporated and the "effective sample size" is less than the total number of observations.

wgt(weightvar)specifies alternative weighting for any data type. The effect size is to be computed by assigning a weight ofweightvarto the studies. When RRs or ORs are declared, their logarithms are weighted. You should only use this option if you are satisfied that the weights are meaningful.

second(modelorestimates and description)(v9 update) A second analysis may be performed using another method, usingfixed,randomorpeto. Alternatively, the user may define their own estimate and 95% CI based on calculations performed externally tometan, along with a description of their method, in the formates lci uci description. The results of this analysis are then displayed in the table and forest plot. Note that ifbyis used then sub-estimates from the second method are not displayed with user defined estimates, for obvious reasons.

first(estimates and description)(v9 update) Use of this command completely changes the waymetanoperates, as results are no longer based on any standard methods. The user defines their own estimate, 95% CI and description as in the above, and must supply their own weightings usingwgt(weightvar)to control display of box sizes. Note that data must be supplied in the 2 or 3 variable syntax (thetase_thetaores lci uci) andbymay not be used used for obvious reasons.+-----------------+ ----+ Continuous data +--------------------------------------------------

cohenpools standardised mean differences by the method of Cohen (the default).

hedgespools standardised mean differences by the method of Hedges.

glasspools standardised mean differences by the method of Glass.

nostandardpools unstandardised mean differences.

fixedspecifies a fixed effect model using the inverse variance method (the default).

randomspecifies a random effects model using the DerSimonian & Laird method.

nointegerdenotes that the number of observations in each arm does not need to be an integer. By default, the first and fourth variables specified (containing N_intervention and N_control respectively) may occasionally be non-integer (see entry fornointegerunder binary data).+--------+ ----+ Output +-----------------------------------------------------------

by()specifies that the meta-analysis is to be stratified according to the variable declared.

sgweightspecifies that the display is to present the percentage weights within each subgroup separately. By defaultmetanpresents weights as a percentage of the overall total.

logreports the results on the log scale (valid for OR and RR analyses from raw data counts only).

nosubgroupindicates that no within-group results are to be presented. By defaultmetanpools trials both within and across all studies.

eformexponentiates all effect sizes and confidence intervals (valid only when the input variables are log odds ratios or log hazard ratios with standard error or confidence intervals).

efficacyexpresses results as the vaccine efficacy (the proportion of cases that would have been prevented in the placebo group that would have been prevented had they received the vaccination). Only available with odds ratios (OR) or risk ratios (RR).

ilevel(#)specifies the coverage (eg 90,95,99 percent) for the individual trial confidence intervals. Default:$S_level.ilevel()andolevel()need not be the same. See set level.

olevel(#)specifies the coverage (eg 90,95,99 percent) for the overall (pooled) trial confidence intervals. Default:$S_level.ilevel()andolevel()need not be the same. See set level.

sortby(varlist)sorts by variable(s) invarlist

label([namevar=namevar], [yearvar=yearvar])labels the data by its name, year or both. Either or both option/s may be left blank. For the table display the overall length of the label is restricted to 20 characters. The optionlcols()will override this if invoked.

nokeepprevents the retention of study parameters in permanent variables (see saved results below).

notableprevents display of table of results.

nographprevents display of graph.

nosecsub(v9 update) prevents the display of sub-estimates using the second method ifsecond()is used. Note that this is invoked automatically with user-defined estimates.+-------------+ ----+ Forest plot +------------------------------------------------------

effect()may be used when the effect size and its standard error are declared. This allows the graph to name the summary statistic used.

nooverallrevents display of overall effect size on graph (automatically enforces thenowtoption).

nowtprevents display of study weight on the graph.

nostatsprevents display of study statistics on graph.

counts(v9 update) displays data counts (n/N) for each group when using binary data, or the sample size, mean and SD for each group if mean differences are used (the latter is a new feature).

group1(string),group2(string)may be used with thecountsoption: the text should contain the names of the two groups.

xlabel()(v9 update) defines x-axis labels. This has been modified so that any number of points may defined. Also, there are no longer any checks made as to whether these points are sensible, so the user may define anything if theforceoption is used. Points must be comma separated.

xtick()adds tick marks to the x-axis. Points must be comma separated.

forceforces the x-axis scale to be in the range specified byxlabel().

boxsca()(v9 update) controls box scaling. This has been modified slightly so that the default is 100 (as in a percentage) and may be increased or decreased as such (e.g., 80 or 120 for 20% smaller or larger respectively)

noboxprevents a "weighted box" being drawn for each study and markers for point estimates only are shown.

texts()(v9 update) specifies font size for text display on graph. This has been modified slightly so that the default is 100 (as in a percentage) and may be increased or decreased as such (e.g., 80 or 120 for 20% smaller or larger respectively)+------------------------------------------------------+ ----+ Further options for the forest plot in the v9 update +-------------

lcols(varlist),rcols(varlist)define columns of additional data to the left or right of the graph. The first two columns on the right are automatically set to effect size and weight, unless suppressed using the optionsnostatsandnowt. Ifcountsis used this will be set as the third column.textsize()can be used to fine-tune the size of the text in order to acheive a satisfactory appearance. The columns are labelled with the variable label, or the variable name if this is not defined. The first variable specified inlcols()is assumed to be the study identifier and this is used in the table output.

astext(#)specifies the percentage of the graph to be taken up by text. The default is 50 and the percentage must be in the range 10-90.

doubleallows variables specified inlcolsandrcolsto run over two lines in the plot. This may be of use if long strings are to be used.

nohetprevents display of heterogeneity statistics in the graph.

summaryonlyshows only summary estimates in the graph (may be of use for multiple subgroup analyses)

rfdistdisplays the confidence interval of the approximate predictive distribution of a future trial, based on the extent of heterogeneity. This incorporates uncertainty in the location and spread of the random effects distribution using the formulat(df) x sqrt(se2 +tau2)where t is the t-distribution with k-2 degrees of freedom, se2 is the squared standard error and tau2 the heterogeneity statistic. The CI is then displayed with lines extending from the diamond. Note that with <3 studies the distribution is inestimable and effectively infinite, thus displayed with dotted lines, and where heterogeneity is zero there is still a slight extension as the t-statistic is always greater than the corresponding normal deviate. For further information see Higgins JPT, Thompson SG (2006)

rflevel(#)specifies the coverage (eg 90,95,99 percent) for the confidence interval of the predictive distribution. Default:$S_level. See set level.

null(#)displays the null line at a user-defined value rather than 0 or 1.

nulloffremoves the null hypothesis line from the graph

favours(string#string)applies a label saying something about the treatment effect to either side of the graph (strings are separated by the # symbol). This replaces the feature available inb1titlein the previous version of metan.

firststats(string),secondstats(string)labels overall user-defined estimates when these have been specified. Labels are displayed in the position usually given to the heterogeneity statistics.

boxopt(),diamopt(),pointopt(),ciopt(),olineopt()specify options for the graph routines within the program, allowing the user to alter the appearance of the graph. Any options associated with a particular graph command may be used, except some that would cause incorrect graph appearance. For example, diamonds are plotted using the twoway pcspike command, so options for line styles are available (see line options); however, altering the x-y orientation with the optionhorizontalorverticalis not allowed. So,diamopt(lcolor(green)lwidth(thick))feeds into a command such aspcspike(y1 x1 y2 x2,lcolor(green) lwidth(thick))

boxopt()controls the boxes and uses options for a weighted marker (e.g., shape, colour; but not size). See marker options

diamopt()controls the diamonds and uses options for pcspike (not horizontal/vertical). See line options

pointopt()controls the point estimate using marker options. See marker options and marker label options

ciopt()controls the confidence intervals for studies using options for pcspike (not horizontal/vertical). See line options

olineopt()controls the overall effect line with options for an additional line (not position). See line options

classicspecifies that solid black boxes without point estimate markers are used as in the previous version of metan.

nowarningswitches off the default display of a note warning that studies are weighted from random effects anaylses.

graph_optionsspecifies overall graph options that would appear at the end of atwowaygraph command. This allows the addition of titles, subtitles, captions etc., control of margins, plot regions, graph size, aspect ratio and the use of schemes. As titles may be added in this way previous optionsb2titleetc. are no longer necessary. See graph options

Options for labbe

nowtdeclares that the plotted data points are to be the same size.

percentdisplays the event rates as percentages rather than proportions.

nulldraws a line corresponding to a null effect (ie p1=p2).

or(#)draws a line corresponding to a fixed odds ratio of#.

rd(#)draws a line corresponding to a fixed risk difference of#.

rr(#)draws a line corresponding to a fixed risk ratio of#. See also therrn()option.

rrn(#)draws a line corresponding to a fixed risk ratio (for the non-event) of#. Therr()andrrn()options may require explanation. Whereas the OR and RD are invariant to the definition of which of the binary outcomes is the "event" and which is the "non-event", the RR is not. That is, while the commandmetan a b c d , orgives the same result asmetan b a d c , or(with direction changed), an RR analysis does not. The L'Abbe plot allows the display of either or both to be superimposed risk difference.

logitis for use with theor()option; it displays the probabilities on the logit scale ie log(p/1-p). On the logit scale the odds ratio is a linear effect, and so this makes it easier to assess the "fit" of the line.

wgt(weightvar)specifies alternative weighting by the specified variable (default is sample size).

symbol(symbolstyle)allows the symbol to be changed (see help symbolstyle) the default being hollow circles (or points if weights are not used).

nolegendsuppresses a legend being displayed (the default if more than one line corresponding to effect measures are specified).

id(idvar)displays marker labels with the specified ID variableidvar.clockvar()andgap()may be used to fine-tune the display, which may become unreadable if studies are clustered together in the graph.

textsize(#)increases or decreases the text size of the id label by specifying#to be more or less than unity. The default is usually satisfactory, but may need to be adjusted.

clockvar(clockvar)specifies the position ofidvararound the study point, as if it were a clock face (values must be integers- see clockposstyle). This may be used to organise labels where studies are clustered together. By default, labels are positioned to the left (9 o'clock) if above the null and to the right (3 o'clock) if below. Missing values inclockvarwill be assigned the default position, so this need not be specified for all observations.

gap(#)increases or decreases the gap between the study marker and the id label by specifying#to be more or less than unity. The default is usually satisfactory, but may need to be adjusted.

graph_optionsare options for Stata 8 graphs (see help on graph).

Remarks on metanFor two or three variables, a variance-weighted analysis is performed in a similar fashion to the meta command; the two variable syntax is

thetaandSE(theta). The 3 variable syntax istheta,lower ci (theta),upper ci(theta). Note that in this situation "theta" is taken to be the logarithm of the effect size if the odds ratio or risk ratio is used.This differsfrom the equivalent in the meta command. This program does not assume the three variables need log transformation: if odds ratios or risk ratios are combined, it is up to the user to log-transform them first. Theeformoption may be used to change back to the original scale if needed. By default the confidence intervals are assumed symmetric, and the studies are pooled by taking the variance to be equal to (CI width)/2z.Note that for graphs on the log scale (that is, ORs or RRs), values outside the range [10e-8,10e8] are not displayed, and similarly graphs of other measures (log ORs, RDs, SMDs) are restricted to the range [-10e8,10e8]. A confidence interval which extends beyond this, or the specified scale if

forceis used, will have an arrow added at the end of the range.

Further notes on v9 update:Ifbyis used with a string variable the stratification variable is not sorted alpha-numerically and the original order that the groups appear in the data is preserved. This may be of use if a particular display order is required; if not,sortbymay be used. The optioncountsis now available for continuous data and displays sample size, mean and SD in each group. The estimate for heterogeneity between groups from a stratified analysis using the Mantel-Haenszel method, and arguably the Peto method, is invalid. Therefore this is not displayed in the output for either of these methods.

Remarks on labbeBy default the size of the plotting symbol is proportional to the sample size of the study. If weights are specified the plotting size will be proportional to the weight variable. Note that

labbehas now been updated to version 8 graphics. All options work the same as in the previous version, and some minor graphics options have been added.

StoredBy default,

metanadds the following new variables to the data set:_ES Effect size (ES) _seES Standard error of ES or, when OR or RR are specfied: _selogES the standard error of its logarithm _LCI Lower confidence limit for ES _UCI Upper confidence limit for ES _WT Study percentage weight _SS Study sample size

ExamplesAll examples use a simulated example dataset (Ross Harris 2006)

. use http://fmwww.bc.edu/repec/bocode/m/metan_example_data

Risk difference from raw cell counts, random effects model, "label" specification with counts displayed

. metan tdeath tnodeath cdeath cnodeath,rd random label(namevar=id, yearid=year) counts(click to run)Sort by year, use data columns syntax. Text size increased, specify percentage of graph as text and two lines per study; suppress stats, weight, heterogeneity stats and table.

. metan tdeath tnodeath cdeath cnodeath,sortby(year) lcols(id year country) rcols (population)textsize(110) astext(60) double nostats nowt nohet notable(click to run)Analyse continuous data (6 parameter syntax), stratify by type of study, with weights summing to 100 within sub group, second analysis specified, display random effects distribution, show raw data counts, display "favours treatment vs. favours control" labels

. metan tsample tmean tsd csample cmean csd,by(type_study) sgweight fixed second(random) rfdistcounts label(namevar = id)favours(Treatment reduces blood pressure # Treatment increasesblood pressure)(click to run)Generate log odds ratio and standard error, analyse with 2 parameter syntax. Graph has exponential form, scale is forced within set limits and ticks added, effect label specified.

. gen logor = ln( (tdeath*cnodeath)/(tnodeath*cdeath) )

. gen selogor = sqrt( (1/tdeath) + (1/tnodeath) + (1/cdeath) +(1/cnodeath) )

. metan logor selogor, eform xlabel(0.5, 1, 1.5, 2, 2.5)force xtick(0.75, 1.25, 1.75, 2.25) effect(Odds ratio)(click to run)Display diagnostic test data with 3 parameter syntax. Weight is number of positive diagnoses, axis label set and null specified at 50%. Overall effect estimate is not displayed, graph for visual examination only.

. metan percent lowerci upperci, wgt(n_positives)xlabel(0,10,20,30,40,50,60,70,80,90,100) forcenull(50) label(namevar=id) nooverall notabletitle(Sensitivity, position(6))(click to run)User has analysed data with a non-standard technique and supplied effect estimates, weights and description of statistics. The scheme "Economist" has been used.

. metan OR ORlci ORuci, wgt(bweight)first(0.924 0.753 1.095 Bayesian)firststats(param V=3.86, p=0.012)label(namevar=id)xlabel(0.25, 0.5, 1, 2, 4) forcenull(1) aspect(1.2) scheme(economist)(click to run)Variable "counts" defined showing raw data. Options to change the box, effect estimate marker and confidence interval used, and the counts variable has been attached to the estimate marker as a label.

. gen counts = ". " + string(tdeath) + "/" + string(tdeath+tnodeath)+ ", " + string(cdeath) + "/" + string(cdeath+cnodeath)

. metan tdeath tnodeath cdeath cnodeath,lcols(id year) notableboxopt( mcolor(forest_green) msymbol(triangle) )pointopt( msymbol(triangle) mcolor(gold) msize(tiny)mlabel(counts) mlabsize(vsmall) mlabcolor(forest_green)mlabposition(1) )ciopt( lcolor(sienna) lwidth(medium) )(click to run)L'Abbe plot with labelled axes and display of risk ratio and risk difference.

. labbe tdeath tnodeath cdeath cnodeath,xlabel(0,0.25,0.5,0.75,1) ylabel(0,0.25,0.5,0.75,1)rr(1.029) rd(0.014) null(click to run)

AuthorsMichael J Bradburn, Jonathan J Deeks, Douglas G Altman. Centre for Statistics in Medicine, University of Oxford, Wolfson College Annexe, Linton Road, Oxford, OX2 6UD, UK

Version 9 updateRoss J Harris (rossharris1978@yahoo.co.uk), Roger M Harbord, Jonathan A C Sterne. Department of Social Medicine, University of Bristol, Canynge Hall, Whiteladies Road, Bristol BS8 2PR, UK

Other updates and improvements to code and help filePatrick Royston. MRC Clinical Trials Unit, 222 Euston Road, London, NW1 2DA

AcknowledgementsThanks to Vince Wiggins, Kit Baum and Jeff Pitblado of Statacorp who offered advice and helped facilitate the version 9 update. Thanks also to all the people who helped with beta-testing and made comments and suggested improvements.

ReferencesHiggins JPT, Thompson SG, Deeks JJ, Altman DG. Measuring inconsistency in meta-analyses. BMJ 2003; 327:557-560. http://dx.doi.org/10.1136/bmj.327.7414.557

Higgins JPT, Thompson SG (2006) Presenting random effects meta-analyses: where we are going wrong? (from presentation, work in preparation)

Also seeSTB: STB-44 sbe24 On-line: help for metan7, metannt meta (if installed), metacum (if installed), metareg (if installed), metabias (if installed), metatrim (if installed), metainf (if installed), galbr (if installed), metafunnel (if installed)