返回顶部
m

meta-analysis-forest-plotter元分析森林图

Use when creating forest plots for meta-analyses, visualizing effect sizes across studies, or generating publication-ready meta-analysis figures. Produces high-quality forest plots with confidence intervals, heterogeneity metrics, and subgroup analyses.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
82
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

meta-analysis-forest-plotter

元分析森林图生成器

为系统综述和元分析创建可发表级别的森林图,支持自定义样式和统计注释。

快速开始

python
from scripts.forest_plotter import ForestPlotter

plotter = ForestPlotter()

生成森林图

plot = plotter.create_plot( studies=[研究A, 研究B, 研究C], effect_sizes=[1.2, 0.8, 1.5], ci_lower=[0.9, 0.5, 1.1], ci_upper=[1.5, 1.1, 1.9], overall_effect=1.15 )

核心功能

1. 基础森林图

python
fig = plotter.plot(
data=studies_df,
effect_col=HR,
cilowercol=CI_lower,
ciuppercol=CI_upper,
studycol=studyname
)

必需数据列:

  • - 研究名称/标识符
  • 效应量(OR、HR、RR、MD等)
  • 置信区间下限
  • 置信区间上限
  • 权重(可选,用于精确度)

2. 统计注释

python
fig = plotter.plotwithstats(
data,
heterogeneity_stats={
I2: 45.2,
p_value: 0.03,
Q_statistic: 18.4
},
overall_effect={
estimate: 1.15,
ci: [0.98, 1.35],
p_value: 0.08
}
)

异质性指标:

指标解释
I² < 25%低异质性
I² 25-50%
中度异质性 |
| I² > 50% | 高度异质性 |
| Q检验p值 < 0.05 | 显著异质性 |

3. 亚组分析

python
fig = plotter.subgroup_plot(
data,
subgroupcol=treatmenttype,
subgroups=[手术, 放疗, 联合治疗]
)

4. 自定义样式

python
fig = plotter.plot(
data,
style=publication,
journal=lancet, # 或 nejm, jama, nature
color_scheme=monochrome,
show_weights=True
)

命令行使用

bash

从CSV数据生成


python scripts/forest_plotter.py \
--input metaanalysisdata.csv \
--effect-col OR \
--output forest_plot.pdf

使用自定义样式

python scripts/forest_plotter.py \ --input data.csv \ --style lancet \ --width 8 --height 10

输出格式

  • - PDF:出版级质量,矢量图形
  • PNG:网页/演示用途,300 DPI
  • SVG:可在Illustrator/Inkscape中编辑
  • TIFF:期刊投稿格式

参考资料

  • - references/forest-plot-styles.md - 期刊特定格式
  • examples/sample-plots/ - 示例输出

技能ID:207 | 版本:1.0 | 许可证:MIT

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 meta-analysis-forest-plotter-1775990295 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 meta-analysis-forest-plotter-1775990295 技能

通过命令行安装

skillhub install meta-analysis-forest-plotter-1775990295

下载

⬇ 下载 meta-analysis-forest-plotter v1.0.0(免费)

文件大小: 8.3 KB | 发布时间: 2026-4-13 11:02

v1.0.0 最新 2026-4-13 11:02
Initial release of meta-analysis-forest-plotter.

- Create publication-ready forest plots for meta-analyses, supporting effect sizes, confidence intervals, heterogeneity metrics, and subgroup analyses.
- Provides customizable styling, including journal-specific presets and export to multiple formats (PDF, PNG, SVG, TIFF).
- Supports both Python API and command-line interface for flexible plot generation.
- Includes examples and references for journal formatting.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部