Use this Skill to pool effect sizes across studies: fixed/random-effects models, heterogeneity tests (I², Cochran Q), forest plot, funnel plot, Egger test, and subgroup analysis using pymare or manual computation.
يبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
عرض SKILL.md
SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
meta-analysis
description
Use this Skill to pool effect sizes across studies: fixed/random-effects models, heterogeneity tests (I², Cochran Q), forest plot, funnel plot, Egger test, and subgroup analysis using pymare or manual computation.
Meta-Analysis: Pooling Effect Sizes Across Studies
TL;DR — Pool effect sizes from multiple studies using fixed-effects or
random-effects models, quantify heterogeneity (I², Cochran Q, τ²), produce
publication-quality forest plots and funnel plots, test for publication bias
(Egger, trim-and-fill), and run subgroup / moderator analyses.
When to Use This Skill
Use this Skill when you have:
A completed systematic review with ≥ 2 quantitative studies on the same outcome
A set of effect sizes (Cohen's d, Hedges' g, OR, RR, correlation r) and their
standard errors or sample sizes
A need to communicate pooled estimates with forest or funnel plots
Questions about heterogeneity between studies or subgroup differences
Task
Use case
Fixed-effects pooling
Studies estimate the same true effect; low heterogeneity
Random-effects pooling
True effects vary across studies; I² > 25%
Heterogeneity decomposition
Understand sources of between-study variance
Forest plot
Visualize study-level and pooled estimates
Funnel plot + Egger test
Detect small-study effects / publication bias
Subgroup analysis
Test whether effect differs by moderator variable
Background & Key Concepts
Effect Size Types
Measure
Formula
Use case
Cohen's d
(M₁ − M₂) / SD_pooled
Two-group continuous outcome
Hedges' g
d × correction factor J(df)
Small samples (n < 20 per group)
Odds Ratio (OR)
(a/b) / (c/d) in 2×2 table
Binary outcome, case-control
Risk Ratio (RR)
(a/(a+b)) / (c/(c+d))
Binary outcome, cohort/RCT
Correlation r
Pearson r
Association between two continuous vars
All are converted to a common scale (log-OR or Fisher's z) for pooling, then
back-transformed for presentation.
Fixed vs Random Effects
Fixed-effects (inverse-variance weighting): assumes one true underlying effect
shared by all studies. Precision-weighted average. Appropriate when studies are
highly homogeneous.
Random-effects (DerSimonian-Laird or REML): assumes true effects vary across
studies drawn from a distribution N(μ, τ²). Accounts for between-study variance τ².
Gives wider, more honest confidence intervals when heterogeneity exists.
Heterogeneity Statistics
Cochran Q: Sum of squared deviations from pooled estimate, weighted by study
precision. Chi-squared distributed with k−1 df. H₀: all studies share one true effect.
I²: Percentage of total variability due to between-study heterogeneity.
I² = (Q − df)/Q × 100. Thresholds: 0–25% low, 25–50% moderate, > 50% high.
τ²: Between-study variance. Estimated by DerSimonian-Laird method-of-moments
or REML.
The trim-and-fill method imputes missing studies on the asymmetric side of the
funnel and re-estimates the pooled effect. Use pymare for this:
from pymare import Dataset
from pymare.estimators import DerSimonianLaird, TrimAndFill
deftrim_and_fill_pymare(es: list, se: list, study_ids: list) -> dict:
"""
Apply trim-and-fill using pymare.
Args:
es: List of effect sizes.
se: List of standard errors.
study_ids: List of study identifier strings.
Returns:
Dictionary with original and adjusted pooled estimates.
"""
dataset = Dataset(
y=es,
v=[s**2for s in se],
n=study_ids, # used as labels only
)
# Original DL estimate
dl = DerSimonianLaird()
dl.fit(dataset)
original = dl.summary_
# Trim-and-fill adjusted
taf = TrimAndFill()
taf.fit(dataset)
adjusted = taf.summary_
return {"original": original, "adjusted": adjusted}
Troubleshooting
Problem
Cause
Fix
tau2 is negative
Q < df (less variation than expected)
Truncate τ² at 0 (as implemented above)
Forest plot labels overlap
Too many studies
Reduce figsize height per study or use abbreviations
I² = 100%
One study has extreme effect or tiny SE
Check data entry; consider influence diagnostics
Egger p-value inflated
Small k (fewer than 10 studies)
Use Begg's rank correlation test instead
pymare import error
Package not installed correctly
pip install pymare --upgrade
Wide pooled CI
High τ² (genuine heterogeneity)
Report τ² and prediction interval; investigate moderators
External Resources
Borenstein et al. (2009) Introduction to Meta-Analysis (Wiley)