Meta-analysis
In Academic Harness: the native meta_analysis tool owns the ledger and
the statistical helper. Discovery and screening stay in review; extraction
must be complete before import_review. The tool reports computed estimates
and warnings — never a certainty, quality, or clinical recommendation.
Use this skill when the deliverable is a pooled estimate, a heterogeneity
summary, a forest/funnel/SROC plot, or a meta-regression. For a narrative
synthesis, use literature-review; for screening and appraisal, use
systematic-review-ledger and risk-of-bias-appraisal.
Ledger layout
.dsh/meta/<slug>/
protocol.json write-once effect measure, model, tau2/CI method, alpha
studies.jsonl append-only prepared studies with analysis-scale effects
analyses.jsonl append-only results (pool, subgroup, regression, …)
plots/ forest-<id>.svg, funnel-<id>.svg, sroc-<id>.svg
exports/ meta-analysis.json, studies.csv, report.md
Never edit these files by hand. Corrections are new analyses, not silent
rewrites of the protocol.
Workflow
1. Freeze the protocol
meta_analysis action=start slug=<name> question="…" outcome="…" \
effect_measure=RR model=random tau2_method=reml ci_method=normal alpha=0.05
effect_measure: OR, RR, HR, IRR, MD, SMD, RD, or ZR.
model: fixed or random. tau2_method: dl, pm, or reml (random).
ci_method: normal or hartung_knapp. HK is often preferred with few
studies; it is wider and uses a t distribution.
start refuses to overwrite unless resume: true. Do not change the
protocol after seeing results; a new question gets a new slug.
2. Add studies
meta_analysis action=add slug=<name> studies=[
{"id":"S1","label":"Smith 2020","effect":-0.22,"se":0.15,"log_scale":true,"alloc":"random","ablat":44},
{"id":"S2","label":"Lee 2021","type":"binary","a":10,"b":20,"c":15,"d":25}
]
- For a ratio measure,
log_scale: true means effect and se are already on
the log scale. Without it, pass the ratio-scale effect plus ci_low/ci_high
(or a log-scale SE explicitly).
- Raw inputs:
type:"binary" with a,b,c,d or events1,n1,events2,n2;
type:"continuous" with m1,sd1,n1,m2,sd2,n2; type:"correlation" with
r,n; type:"hr" with hr,ci_low,ci_high or log_hr,se;
type:"diagnostic" with tp,fp,fn,tn.
- Metadata (
alloc, dose, rob, design, year, …) is preserved for
subgroup and meta-regression.
- Duplicate ids are skipped and reported. Invalid studies are skipped with the
reason; do not silently drop them from the report.
3. Pool and inspect heterogeneity
meta_analysis action=pool slug=<name>
Report the pooled estimate and 95% CI, k, model, τ² method, CI method, Q, I²,
τ², prediction interval, and every warning. Do not call a result "significant"
or "effective" on the tool's behalf; report the numbers and let the author
interpret them. A prediction interval is available only with at least three
studies.
4. Subgroups, meta-regression, influence
meta_analysis action=subgroup slug=<name> field=alloc
meta_analysis action=meta_regression slug=<name> covariates=["ablat"]
meta_analysis action=leave_one_out slug=<name>
field must be a metadata field; groups with one study are reported but not
pooled.
- Meta-regression covariates must be numeric. Categorical moderators need
explicit dummy coding. The output includes residual τ², Q_E, p, and a
pseudo-R²; it is an association under the model, not a causal effect.
leave_one_out reports the full estimate and each omitted-study estimate.
5. Publication bias
meta_analysis action=publication_bias slug=<name>
Report Egger's intercept test, Begg's rank correlation, and the funnel plot
path. Fewer than 10 studies makes these diagnostics unreliable; the tool
warns. Trim-and-fill is not implemented in this release; say so rather
than implying it was run. Funnel asymmetry is not proof of publication bias.
6. Diagnostic accuracy
meta_analysis action=add slug=<diag-name> studies=[{"id":"D1","type":"diagnostic","tp":40,"fp":10,"fn":20,"tn":70}, …]
meta_analysis action=diagnostic slug=<diag-name>
The current implementation pools logit sensitivity and specificity
separately and draws study points plus the pooled point. It is not a full
bivariate/HSROC model; state that limitation. The SROC plot path is returned.
7. Import a review extraction table
meta_analysis action=import_review slug=<name> review=<review-slug>
Defaults match the built-in PICO fields (effect, se, ci_low, ci_high,
n, outcome, effect_measure, label). Pass mapping for a custom
template. Only complete extraction rows are imported; conflicted, incomplete,
and outcome/measure-mismatched rows are skipped with reasons. Ratio measures
need a confidence interval or explicit log-scale SE.
8. Plots, report, export
meta_analysis action=plot slug=<name> kind=forest analysis_id=ma0001
meta_analysis action=report slug=<name>
meta_analysis action=export slug=<name> format=json
meta_analysis action=export slug=<name> format=csv
meta_analysis action=export slug=<name> format=report
meta_analysis action=export slug=<name> format=forest
meta_analysis action=export slug=<name> format=funnel
meta_analysis action=export slug=<name> format=sroc
pool, publication_bias, and diagnostic write their plot automatically.
Exports refuse to overwrite unless overwrite: true.
Reporting rules
- Report the model, τ² estimator, CI method, alpha, k, and every warning.
- Use "pooled estimate" and "95% CI", not "proven", "effective", "safe", or
"recommended".
- Heterogeneity is part of the result, not an afterthought: report Q, I², τ²,
and the prediction interval when available.
- Fewer than 5 studies: treat heterogeneity and CIs as unstable. Fewer than 10:
do not rely on funnel-plot tests.
- A meta-regression coefficient is not a causal effect.
- A diagnostic SROC here is a study-point plot with univariate pooling; do not
describe it as a bivariate/HSROC analysis.
- Import only complete extraction rows; never fill a conflicted value to make a
study eligible.
- The tool never decides certainty, quality, or clinical applicability.
1---2name: meta-analysis3description: Run a pairwise meta-analysis as an auditable ledger with the native `meta_analysis` tool — effect-size conversion, fixed/random pooling, DL/PM/REML tau², Hartung–Knapp CIs, heterogeneity, subgroup and meta-regression analyses, leave-one-out, Egger/Begg/funnel diagnostics, diagnostic-accuracy pooling, forest/funnel/SROC plots, and import from a review extraction table. Use when the user asks for pooled effect sizes, heterogeneity, a forest plot, a meta-regression, publication bias, or diagnostic accuracy synthesis.4allowed-tools: Read Write Edit Bash5license: MIT6metadata:7 source: https://skillmd.com/skills/raktim-mondol/meta-analysis8 version: "1.0"9 skill-author: Academic Harness10---1112# Meta-analysis1314> **In Academic Harness:** the native `meta_analysis` tool owns the ledger and15> the statistical helper. Discovery and screening stay in `review`; extraction16> must be complete before `import_review`. The tool reports computed estimates17> and warnings — never a certainty, quality, or clinical recommendation.1819Use this skill when the deliverable is a pooled estimate, a heterogeneity20summary, a forest/funnel/SROC plot, or a meta-regression. For a narrative21synthesis, use `literature-review`; for screening and appraisal, use22`systematic-review-ledger` and `risk-of-bias-appraisal`.2324## Ledger layout2526```27.dsh/meta/<slug>/28 protocol.json write-once effect measure, model, tau2/CI method, alpha29 studies.jsonl append-only prepared studies with analysis-scale effects30 analyses.jsonl append-only results (pool, subgroup, regression, …)31 plots/ forest-<id>.svg, funnel-<id>.svg, sroc-<id>.svg32 exports/ meta-analysis.json, studies.csv, report.md33```3435Never edit these files by hand. Corrections are new analyses, not silent36rewrites of the protocol.3738## Workflow3940### 1. Freeze the protocol4142```text43meta_analysis action=start slug=<name> question="…" outcome="…" \44 effect_measure=RR model=random tau2_method=reml ci_method=normal alpha=0.0545```4647- `effect_measure`: `OR`, `RR`, `HR`, `IRR`, `MD`, `SMD`, `RD`, or `ZR`.48- `model`: `fixed` or `random`. `tau2_method`: `dl`, `pm`, or `reml` (random).49- `ci_method`: `normal` or `hartung_knapp`. HK is often preferred with few50 studies; it is wider and uses a t distribution.51- `start` refuses to overwrite unless `resume: true`. Do not change the52 protocol after seeing results; a new question gets a new slug.5354### 2. Add studies5556```text57meta_analysis action=add slug=<name> studies=[58 {"id":"S1","label":"Smith 2020","effect":-0.22,"se":0.15,"log_scale":true,"alloc":"random","ablat":44},59 {"id":"S2","label":"Lee 2021","type":"binary","a":10,"b":20,"c":15,"d":25}60]61```6263- For a ratio measure, `log_scale: true` means `effect` and `se` are already on64 the log scale. Without it, pass the ratio-scale effect plus `ci_low`/`ci_high`65 (or a log-scale SE explicitly).66- Raw inputs: `type:"binary"` with `a,b,c,d` or `events1,n1,events2,n2`;67 `type:"continuous"` with `m1,sd1,n1,m2,sd2,n2`; `type:"correlation"` with68 `r,n`; `type:"hr"` with `hr,ci_low,ci_high` or `log_hr,se`;69 `type:"diagnostic"` with `tp,fp,fn,tn`.70- Metadata (`alloc`, `dose`, `rob`, `design`, `year`, …) is preserved for71 subgroup and meta-regression.72- Duplicate ids are skipped and reported. Invalid studies are skipped with the73 reason; do not silently drop them from the report.7475### 3. Pool and inspect heterogeneity7677```text78meta_analysis action=pool slug=<name>79```8081Report the pooled estimate and 95% CI, k, model, τ² method, CI method, Q, I²,82τ², prediction interval, and every warning. Do not call a result "significant"83or "effective" on the tool's behalf; report the numbers and let the author84interpret them. A prediction interval is available only with at least three85studies.8687### 4. Subgroups, meta-regression, influence8889```text90meta_analysis action=subgroup slug=<name> field=alloc91meta_analysis action=meta_regression slug=<name> covariates=["ablat"]92meta_analysis action=leave_one_out slug=<name>93```9495- `field` must be a metadata field; groups with one study are reported but not96 pooled.97- Meta-regression covariates must be numeric. Categorical moderators need98 explicit dummy coding. The output includes residual τ², Q_E, p, and a99 pseudo-R²; it is an association under the model, not a causal effect.100- `leave_one_out` reports the full estimate and each omitted-study estimate.101102### 5. Publication bias103104```text105meta_analysis action=publication_bias slug=<name>106```107108Report Egger's intercept test, Begg's rank correlation, and the funnel plot109path. Fewer than 10 studies makes these diagnostics unreliable; the tool110warns. Trim-and-fill is **not implemented** in this release; say so rather111than implying it was run. Funnel asymmetry is not proof of publication bias.112113### 6. Diagnostic accuracy114115```text116meta_analysis action=add slug=<diag-name> studies=[{"id":"D1","type":"diagnostic","tp":40,"fp":10,"fn":20,"tn":70}, …]117meta_analysis action=diagnostic slug=<diag-name>118```119120The current implementation pools logit sensitivity and specificity121separately and draws study points plus the pooled point. It is **not** a full122bivariate/HSROC model; state that limitation. The SROC plot path is returned.123124### 7. Import a review extraction table125126```text127meta_analysis action=import_review slug=<name> review=<review-slug>128```129130Defaults match the built-in PICO fields (`effect`, `se`, `ci_low`, `ci_high`,131`n`, `outcome`, `effect_measure`, `label`). Pass `mapping` for a custom132template. Only complete extraction rows are imported; conflicted, incomplete,133and outcome/measure-mismatched rows are skipped with reasons. Ratio measures134need a confidence interval or explicit log-scale SE.135136### 8. Plots, report, export137138```text139meta_analysis action=plot slug=<name> kind=forest analysis_id=ma0001140meta_analysis action=report slug=<name>141meta_analysis action=export slug=<name> format=json142meta_analysis action=export slug=<name> format=csv143meta_analysis action=export slug=<name> format=report144meta_analysis action=export slug=<name> format=forest145meta_analysis action=export slug=<name> format=funnel146meta_analysis action=export slug=<name> format=sroc147```148149`pool`, `publication_bias`, and `diagnostic` write their plot automatically.150Exports refuse to overwrite unless `overwrite: true`.151152## Reporting rules153154- Report the model, τ² estimator, CI method, alpha, k, and every warning.155- Use "pooled estimate" and "95% CI", not "proven", "effective", "safe", or156 "recommended".157- Heterogeneity is part of the result, not an afterthought: report Q, I², τ²,158 and the prediction interval when available.159- Fewer than 5 studies: treat heterogeneity and CIs as unstable. Fewer than 10:160 do not rely on funnel-plot tests.161- A meta-regression coefficient is not a causal effect.162- A diagnostic SROC here is a study-point plot with univariate pooling; do not163 describe it as a bivariate/HSROC analysis.164- Import only complete extraction rows; never fill a conflicted value to make a165 study eligible.166- The tool never decides certainty, quality, or clinical applicability.