Running a meta-analysis in Stata means using the built-in meta suite, introduced in Stata 16, which declares your study data once with meta set or meta esize and then pools, plots, and probes it through a family of consistent commands: meta summarize for the pooled effect, meta forestplot and meta funnelplot for the figures, meta regress for moderators, and meta bias for small-study effects. It is a fully supported, documented alternative to R for the statistics of a systematic review, wrapped in Stata’s famously terse syntax.

How the meta suite is organised

The design principle is declare once, analyse everywhere. Before Stata 16, meta-analysis lived entirely in community-contributed commands; since then StataCorp ships an official suite whose commands share one declaration, so the effect size, its standard error, the model, and the estimator are stated a single time and every later command respects them. That architecture prevents the classic spreadsheet failure where the forest plot quietly uses different settings from the bias test. The suite covers pairwise synthesis, subgroup analysis, meta-regression, cumulative analysis, small-study diagnostics, and, in newer releases, multivariate and multilevel extensions. Everything is documented in a single reference manual with worked examples and the underlying formulas, which sounds mundane until you have spent an afternoon reconciling three R packages that define the same statistic slightly differently. The suite ships with every current edition of Stata rather than as an add-on, so if your institution licenses Stata at all, the meta-analysis machinery is already on your machine. How this ecosystem compares with the alternatives is set out in our software comparison for meta-analysis.

Declaring your data with meta set and meta esize

Everything starts with the declaration, and getting it right is half the analysis. If your spreadsheet already holds computed effect sizes, run meta set es se, naming the effect variable and its standard error; this is the route for pooled hazard ratios or adjusted estimates, entered on the log scale. If you have raw summary data, meta esize computes the effect for you: give it events and totals per arm for a log risk ratio or log odds ratio, or means, standard deviations, and sample sizes for a standardised mean difference such as Hedges’ g, with risk differences, Cohen’s d, and other measures available through options. The declaration also fixes the random-effects model and estimator, and labels the studies, and any of those defaults can be overridden later on an individual command when a sensitivity analysis calls for it. Declare wrongly, effects on the wrong scale, standard errors confused with variances, and every downstream command inherits the error. A useful discipline is to recompute one or two study-level effects by hand, or against the original papers, immediately after declaring; thirty seconds of arithmetic has caught more extraction errors than any amount of staring at a forest plot later. Choosing the measure itself deserves the care described in our guide to choosing effect sizes.

Getting data in and checking the declaration

Study data usually arrive as a spreadsheet, and import excel or import delimited brings the extraction sheet into Stata with one row per study. Before declaring, check the basics in the Data Editor: ratio measures on the log scale, standard errors rather than standard deviations in the error column, and no stray text in numeric fields. After declaration, two small commands repay the habit of running them. meta query reports exactly what has been declared, the effect size label, the model, and the estimator, which is the fastest way to catch a wrong setting before it contaminates a day of output. And because the declaration is stored with the dataset, saving the file preserves it, so a collaborator who opens the data tomorrow inherits the same settings rather than silently reconstructing their own. Keep the whole sequence, import, checks, declaration, analyses, in a single do-file from the first session; retrofitting reproducibility after the analysis has sprawled across interactive commands never quite works, and the do-file is the artefact a journal or a supervisor will eventually ask to see.

Pooling with meta summarize and the estimator question

meta summarize prints the study table, weights, the pooled estimate with its confidence interval, and the heterogeneity block: tau-squared, I-squared, H-squared, and the Q test. The suite defaults to a random-effects model estimated by REML, a genuinely better default than the DerSimonian and Laird estimator older tools still use, and options switch to empirical Bayes, maximum likelihood, or fixed and common-effect models when the protocol calls for them. The estimator choice is not cosmetic: with few studies or heterogeneous effects, different tau-squared estimators can produce visibly different intervals, so state the choice in the protocol and hold to it. Whether a random-effects model is right for your review at all is a decision to make before the software opens; our guide to the fixed versus random effects choice works through it, and our explainer on understanding heterogeneity statistics covers the numbers the output reports. Adding predinterval displays the prediction interval, which tells readers the range a new study might plausibly show, a quantity increasingly expected in random-effects reporting and still absent from older software. The output also returns its results in Stata’s stored-results system, so pooled estimates can flow into tables through commands like putdocx without a single number being retyped, closing the transcription gap where copy-paste errors breed.

Forest plots, funnel plots, and graph export

meta forestplot draws a forest plot directly from the declaration, with weights, the pooled diamond, heterogeneity statistics, and optional subgroup panels, and columns can be added or reordered to match journal expectations. meta funnelplot produces the standard and contour-enhanced funnel plot, shading significance regions so visual asymmetry can be judged against the pattern publication bias would leave. Because these are native Stata graphs, they export through graph export to EPS, PDF, PNG, and SVG at print resolution, a genuine strength for submission-ready figures. Journal-specific styling, fonts, symbol sizes, and column layouts, is handled through the standard graph options and saved scheme files, so once a review’s figure style is settled it can be reapplied to every plot with one option rather than redrawn by hand. What the shapes in each figure mean is covered in our guides to making sense of forest plots and reading funnel plots, and if you want a quick figure without a licence, our free funnel plot generator runs in the browser.

Subgroups, meta-regression, and small-study effects

Moderator analysis is where Stata comfortably outruns RevMan. meta summarize, subgroup(design) splits the pooled analysis by a categorical variable and tests for differences between subgroups, while meta regress fits a full meta-regression on continuous or categorical moderators, with bubble plots to visualise the fitted line and options for the Knapp-Hartung adjustment. The usual cautions, low power with few studies and the risk of confounded moderators, are discussed in our piece on subgroup and meta-regression methods. For small-study effects, meta bias runs the Egger regression-based test and rank-based alternatives, and meta trimfill applies trim-and-fill to estimate how the pooled effect shifts if presumed missing studies are imputed. As everywhere, the tests need a reasonable number of studies, commonly ten or more, before their answers mean much, and a non-significant result is not evidence of absence. Treat both as sensitivity analyses, not verdicts; the reasoning is unpacked in our article on detecting publication bias, and a quick check is available in our publication bias calculator.

Cumulative and leave-one-out analysis

Two further options turn meta summarize into a sensitivity workhorse. The cumulative() option repeats the pooled analysis as studies accumulate in a specified order, usually by publication year, which shows whether the evidence stabilised early or still swings with each new trial; ordering by precision instead gives another view of small-study behaviour. The leaveoneout option reruns the synthesis omitting one study at a time, exposing any single trial whose removal moves the pooled estimate or collapses the heterogeneity, exactly the influence diagnostics a careful review reports. Both produce tables and companion forest-style plots with almost no extra syntax, which is exactly the economy the declaration system was designed to buy: once the data are declared correctly, each additional analysis is a line, not an afternoon. Both belong in the pre-specified plan described in our guide to sensitivity analysis in a meta-analysis rather than being improvised when a reviewer asks.

The metan tradition

Long before the official suite, Stata users ran meta-analysis with community-contributed commands, and metan was the workhorse, alongside metareg, metabias, and metafunnel. That tradition is not dead: metan remains actively maintained, appears throughout two decades of published reviews, and some teams still prefer its options and plot style. For new work the official suite is the better default, it is documented in the Stata manual, guaranteed to survive version upgrades, and consistent across commands, but you will meet metan syntax constantly when reproducing older analyses, so recognising both dialects is part of Stata literacy in this field. The same applies to the older companions: metareg for meta-regression, metabias and metafunnel for small-study diagnostics, and metaninf for influence analysis all have official successors now, but the community versions still install from the Statistical Software Components archive with ssc install metan when an older do-file demands them.

Stata versus R, and the licensing reality

Statistically, Stata’s suite and R’s meta and metafor packages cover the same core ground: modern estimators, prediction intervals, meta-regression, and bias diagnostics. R goes further at the edges, with selection models, extensive multilevel machinery, and the dmetar helpers described in our guide to running a meta-analysis in R, and R’s ecosystem moves faster because anyone can publish a package. Stata answers with coherence: one vendor, one manual with worked examples and formulas, one predictable syntax, and official support, which many epidemiology and economics groups value. The decisive practical difference is money. R is free; Stata is a commercial product licensed per user, and although universities often hold campus licences that make it effectively free to their members, an unaffiliated researcher must buy a licence at real cost, with the exact figure depending on edition and licence type, so check current prices rather than budgeting from an old quote. Both produce a scripted, reproducible analysis through do-files, so either beats a point-and-click tool for auditability. In practice the deciding factors are rarely statistical: teams pick the environment their senior statistician already works in, the one their collaborators can rerun, and the one their institution has licensed. If neither is worth learning for a single project, the arithmetic of pooling is laid out in our walkthrough of the meta-analysis process, and handing the whole job to a statistician is often cheaper than a licence.