RevMan Funnel Plot
Overview
Generates a funnel plot for publication bias assessment. Includes pseudo-95% confidence interval lines and automatic Egger's regression test.
Command
revman funnel [--outcome <id>] [--output <file>]
Procedure:
-
If
--outcomespecified, read study data from the active review.- Determine active review from
.revmanrc. - Read study files in
{REVIEW_DIR}/.revman/studies/. - For each study with the specified outcome, extract TE and seTE.
- Pooled estimate from fixed-effects inverse-variance.
- If not, proceed with manual input.
- Determine active review from
-
If no outcome specified, ask:
Funnel plot data source: 1. Auto-generate from study outcome data in active review 2. Manual entry -
For manual entry, collect studies:
- "Study label:" → label
- "Effect estimate (TE):" → TE
- "Standard error (seTE):" → seTE
- "Add another study? (y/n):"
-
Build JSON input:
{ "studies": [ {"label": "Smith 2020", "TE": -0.5, "seTE": 0.3}, {"label": "Jones 2021", "TE": -0.8, "seTE": 0.4} ], "pooled_te": -0.52, "effect_measure": "OR", "scale": "log" } -
Run:
echo '<json>' | python3 scripts/revman-funnel.py -o {output_path} -
Output defaults to
funnel_plot.pngin the review root. -
Confirm and display Egger's test result:
Funnel plot saved to reviews/{name}/funnel_plot.png Studies: {N} Egger's test: intercept = {x}, p = {y}
Script Location
scripts/revman-funnel.py — Python 3. Accepts JSON on stdin, writes PNG. Runs Egger's regression test automatically when ≥ 3 studies.
Error Handling
| Situation | Response | |-----------|----------| | < 3 studies | "Funnel plot requires at least 3 studies for meaningful interpretation. Generated without Egger's test." | | < 10 studies | "Warning: fewer than 10 studies. Egger's test has low power." | | Script not found | "Funnel plot script not found." |
Scan to join WeChat group