Meta-Analysis in Stata: A Practical Guide with Case Studies on Continuous and Dichotomous Data

Meta-Analysis in Stata

Part A: Meta Analysis for Continuous Data:

Case Study 1:

Research Question

Does physical activity improve self-esteem in adolescents compared to no intervention?

Data:

Study IDSample Size (Exercise Group)Mean Self-Esteem (Exercise Group)SD (Exercise Group)Sample Size (Control Group)Mean Self-Esteem (Control Group)SD (Control Group)
Study 16031.25.56027.85.6
Study 27532.5675296.2
Study 35030.45.25027.55.5
Study 480335.88029.56
Study 56531.85.66528.65.7
Study 690346.190306.4
Study 75530.55.95527.26
Study 810033.86.310029.96.6
Study 970325.77028.55.9
Study 108533.16.28529.66.5
Data Description:

The dataset includes summary statistics from 10 studies comparing self-esteem scores between exercise and control groups, each providing sample size, mean, and standard deviation.

Step by Step Meta Analysis for Continuous data in Stata:

Step 1: Import data in Stata

Import data in Stata
Data View in Stata:
Data View in Stata

Step 2: Click on Statistics menu, select Meta-Analysis, Select Setup then click on Compute and declare effect sizes for two group Comparison of Continuous Outcome then define study variables and Effect size Method and Click on Submit.

Statistics menu

Step 3: Click on Forest Plot to generate the visual summary of individual and pooled study effects and Click on Submit.

Click on Forest Plot
Forest Plot:
Forest Plot
Interpretation:

All studies show positive SMDs (0.54 to 0.64), indicating a consistent moderate effect of physical activity on adolescent self-esteem. None of the 95% confidence intervals include zero, meaning each effect is statistically significant. The overall pooled SMD is 0.59 [95% CI: 0.48, 0.69], confirming a moderate and reliable benefit. Heterogeneity is absent (τ² = 0.00, I² = 0.00%, H² = 1.00; Q(9) = 0.31, p = 1.00), suggesting highly consistent results across studies. The pooled effect is statistically significant (z = 10.98, p = 0.00), providing strong evidence that physical activity improves self-esteem in adolescents.

Step 4: Publication Bias under the Meta-Analysis menu and click on Funnel Plot for Graphical Diagnostic of Small Study Effect to visually assess bias or asymmetry.

Publication Bias under the Meta-Analysis menu
Funnel Plot:
Funnel Plot
Interpretation:

The Funnel Plot Seems Symmetrical Suggest No Publication Bias.

Step 5: To Perform Egger’s Test, Click on test for small-study effects in Meta Analysis under the Publication Bias section.

Click on test for small-study effects in Meta Analysis

Eggers Test Hypothesis:

Null Hypothesis (H₀):

There is no funnel plot asymmetry — the effect sizes are not related to their standard errors.

This implies no publication bias or small-study effects.

Alternative Hypothesis (H₁):

There is funnel plot asymmetry — the effect sizes are related to their standard errors.
This suggests potential publication bias or small-study effects.

Stata Output Eggers Test:

Regression-based Egger test for small-study effects

Random-effects model

Method: REML

H0: beta1 = 0; no small-study effects beta1 = -0.84 SE of beta1 = 3.059 z = -0.27 Prob > |z| = 0.7845
Interpretation:

Since the p-value is 0.7845 (greater than 0.05), we fail to reject the null hypothesis.
This means there is no statistical evidence of funnel plot asymmetry, and hence no indication of publication bias in the meta-analysis.

Part B: Meta Analysis for Dichotomous Data:

Case Study 2:

Research Question:

Does Drug A reduce the risk of infection compared to Placebo?

Data

Study IDDrug A EventsDrug A No EventsDrug A TotalPlacebo EventsPlacebo No EventsPlacebo Total
Study 112901022579104
Study 218841023073103
Study 310901002080100
Study 48941021686102
Study 520821023570105
Study 615851002878106
Study 717851023368101
Study 813891022780107
Study 91970893170101
Study 1014861002680106
Data Description:

The dataset includes results from 10 studies comparing infection rates between patients receiving Drug A and those receiving a placebo. Each study reports the number of infection events and non-events in both groups as well as Total enabling the calculation of risk Differences.

Step by Step Meta Analysis for Dichotomous Data in Stata:

Step 1: Import data in Stata

Import data in Stata
Data View in Stata:
Data View in Stata

Step 2: Click on Statistics menu, select Meta-Analysis, Select Setup then click on Compute and declare effect sizes for two group Comparison of Binary Outcome then define study variables and Effect size Method and Click on Submit.

Click on Statistics menu

Step 3: Click on Forest Plot to generate the visual summary of individual and pooled study effects and Click on Submit.

Click on Forest Plot to generate the visual summary of individual
Forest Plot:
Forest Plot
Interpretation:

The meta-analysis shows a pooled risk difference of -0.11 [95% CI: -0.15, -0.08], indicating that the Drug A reduces risk by 11% compared to control. Most studies report negative risk differences, and many confidence intervals do not cross zero, suggesting statistically significant effects. Heterogeneity is negligible (τ² = 0.00, I² = 0.01%, H² = 1.00), indicating high consistency across studies. The Q-test (Q(9) = 1.65, p = 1.00) supports the absence of significant heterogeneity. The overall effect is statistically significant (z = -6.53, p = 0.00), providing strong evidence that the Drug A is effective in reducing the risk of infection compared to Placebo.

Step 4: Publication Bias under the Meta-Analysis menu and click on Funnel Plot for Graphical Diagnostic of Small Study Effect to visually assess bias or asymmetry.

Publication Bias under the Meta-Analysis menu
Funnel Plot:
Funnel Plot
Interpretation:

The Funnel Plot Seems Symmetrical Suggest No Publication Bias

Step 5: To Perform Egger’s Test, Click on test for small-study effects in Meta Analysis under the Publication Bias section.

Click on test for small-study effects in Meta Analysis

Eggers Test Hypothesis:

Null Hypothesis (H₀):

There is no funnel plot asymmetry — the effect sizes are not related to their standard errors.

This implies no publication bias or small-study effects.

Alternative Hypothesis (H₁):

There is funnel plot asymmetry — the effect sizes are related to their standard errors.
This suggests potential publication bias or small-study effects.

Stata Output Eggers Test:

Regression-based Egger test for small-study effects

Random-effects model

Method: REML

H0: beta1 = 0; no small-study effects beta1 = -2.52[latex]</p> <p>  [latex]SE of beta1 = 3.199 z = -0.79 Prob > |z| = 0.4307
Interpretation:

Since the p-value is 0.4307 (greater than 0.05), we fail to reject the null hypothesis.
This means there is no statistical evidence of funnel plot asymmetry, and hence no indication of publication bias in the meta-analysis.


Meta-Analysis in Stata Quiz Questions – Test Your knowledge

Meta-Analysis in Stata Quiz Question

Quiz helps us to increase our knowledge

1 / 5

1. What is the primary command used in Stata to perform a meta-analysis?

2 / 5

2. Which command is used in Stata to prepare your data for meta-analysis?

3 / 5

3. Which statistic in Stata helps to assess publication bias in meta-analysis?

4 / 5

4. What does a high value of I² (>75%) suggest in meta-analysis results in Stata?

5 / 5

5. Which command in Stata generates a forest plot after performing a meta-analysis?

Your score is

The average score is 0%

0%