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

Meta Analysis in R-Software

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.

Saving this Data in Excel for Meta-Analysis in R Software

Step by Step Meta Analysis for Continuous data in R Software:

Step 1: Load Packages and Data in R Software

Load Packages and Data in R Software
Data View in R Software:
Data View in R Software

Step 2: Calculate Effect Sizes (Method= Standardized Mean Difference (SMD))

Calculate Effect Sizes

Step 3: Run Random-Effects Meta-Analysis

Run Random-Effects Meta-Analysis
R Software Output Summary:
Random-Effects Model (k = 10; tau^2 estimator: REML)
tau^2 (estimated amount of total heterogeneity): 0 (SE = 0.0133)
tau (square root of estimated tau^2 value):      0
I^2 (total heterogeneity / total variability):   0.00%
H^2 (total variability / sampling variability):  1.00
Test for Heterogeneity:
Q(df = 9) = 0.3169, p-val = 1.0000
Model Results:
estimate      se     zval      pval   ci.lb   ci.ub     
  0.5841   0.0534   10.9288  <.0001  0.4794   0.6889  ***
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Interpretation:

The pooled Effect is 0.58 and statistically significant (p < 0.0001), indicating higher self-esteem in the exercise group. No heterogeneity is observed among the studies (I² = 0%, τ² = 0, Q-test p = 1.00). This suggests that the effect is consistent across all 10 studies.

Step 4: Forest Plot

Forest Plot
Forest Plot:
Forest Plot
Interpretation:

All studies report positive standardized mean differences (SMDs) ranging from 0.54 to 0.64, indicating a consistent moderate effect of physical activity on adolescent self-esteem. Since none of the 95% confidence intervals include zero, each individual effect is statistically significant. The overall pooled SMD is 0.58 [95% CI: 0.48, 0.69], confirming a moderate and reliable positive impact of physical activity on self-esteem.

Step 5: Funnel Plot and Egger’s Test (Publication Bias)

Funnel Plot and Egger’s Test
Funnel Plot:
Funnel Plot
Interpretation:

The Funnel Plot Seems Symmetrical Suggest No Publication Bias

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.

R Software Output Eggers Test:

Regression Test for Funnel Plot Asymmetry

Model:     mixed-effects meta-regression model
Predictor: standard error

Test for Funnel Plot Asymmetry: z = -0.2845, p = 0.7761
Limit Estimate (as sei -> 0):   b = 0.7305 (CI: -0.2832, 1.7442)

Interpretation:

Since the p-value is 0.7761 (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.

Saving this Data in Excel for Meta-Analysis in R Software

Step by Step Meta Analysis for Dichotomous Data in R Software:

Load Packages and Data in R Software
Data View in R Software:
Data View in R Software

Step 2: Calculate Effect Sizes (Method= Risk Difference (RD))

Calculate Effect Sizes

Step 3: Run Random-Effects Meta-Analysis

Run Random-Effects Meta-Analysis

R Software Output Summary:

Random-Effects Model (k = 10; tau^2 estimator: REML)
tau^2 (estimated amount of total heterogeneity): 0 (SE = 0.0014)
tau (square root of estimated tau^2 value):      0
I^2 (total heterogeneity / total variability):   0.00%
H^2 (total variability / sampling variability):  1.00
Test for Heterogeneity:
Q(df = 9) = 1.6504, p-val = 0.9959
Model Results:
estimate      se     zval    pval    ci.lb    ci.ub     
 -0.1126  0.0172  -6.5327  <.0001  -0.1463  -0.0788  ***
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Interpretation:

The pooled risk difference is –0.11 (p < 0.0001), indicating that Drug A reduces the infection risk by 11 percentage points compared to placebo. The 95% confidence interval [–0.15, –0.08] confirms that this reduction is statistically significant. With I² = 0%, there is no heterogeneity, meaning the treatment effect is consistent across all studies.

Step 4: Forest Plot

Forest Plot
Forest Plot:
Forest Plot
Interpretation:

All studies report negative risk differences (RDs) ranging from –0.08 to –0.16, indicating a consistent reduction in infection risk with Drug A compared to placebo. The overall pooled risk difference is –0.11 [95% CI: –0.15, –0.08], confirming a moderate and reliable absolute reduction in infection risk due to Drug A.

Step 5: Funnel Plot and Egger’s Test (Publication Bias)

Funnel Plot and Egger’s Test
Funnel Plot:
Funnel Plot
Interpretation:

The Funnel Plot Seems Symmetrical Suggest No Publication Bias

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.

R Software Output Eggers Test:

Regression Test for Funnel Plot Asymmetry

Model:     mixed-effects meta-regression model

Predictor: standard error

Test for Funnel Plot Asymmetry: z = -0.7881, p = 0.4307

Limit Estimate (as sei -> 0):   b = 0.0241 (CI: -0.3175, 0.3657)

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 R-Software Quiz Questions – Test Your knowledge

Meta-Analysis in R-Software Quiz Question

Quiz helps us to increase our knowledge

1 / 5

1. Which R package is commonly used for conducting meta-analyses in R software?

2 / 5

2. In meta-analysis using R, what is the primary purpose of a forest plot?

3 / 5

3. Which statistic is most often used to measure heterogeneity in a meta-analysis using R?

4 / 5

4. Which function in R can be used to create a funnel plot for detecting publication bias in meta-analysis?

5 / 5

5. In R meta-analysis, which plot visually shows the possibility of publication bias through asymmetry?

Your score is

The average score is 0%

0%

Leave a Comment

Your email address will not be published. Required fields are marked *