PyMetaAnalysis¶
PyMetaAnalysis is a pandas-first Python library for conventional study-level meta-analysis. It accepts DataFrames, NumPy arrays, and ordinary Python sequences, then returns inspectable result objects that retain study-level effects, exclusions, weights, method choices, and diagnostics.
Early-stage software
The public API is still under development and may change during the 0.x series. Statistical results should be reviewed in the context of the analysis protocol and independently checked for consequential work.
Choose an entry point¶
| Your available data | Function | Supported effects |
|---|---|---|
| Effect estimates and sampling variances | meta_analysis() |
Generic inverse variance |
| Events and totals for two groups | meta_binary() |
OR, RR, RD |
| Means, SDs, and sample sizes for two groups | meta_continuous() |
MD, Hedges' g |
| Effect estimates, uncertainty, and study-level moderators | meta_regression() |
Generic Meta-regression |
The three pooling functions accept an optional subgroup= column or array. Supplying
it returns a dedicated subgroup result containing each group, the overall
analysis, and a formal test for subgroup differences.
Install¶
Install the core numerical library:
pip install PyMetaAnalysis
Install Matplotlib support only when plots are needed:
pip install "PyMetaAnalysis[plot]"
See installation for supported Python versions, editable development installs, extras, and verification.
The executable quickstart notebook demonstrates a complete synthetic-data workflow. Users porting an existing R analysis can start with mapping R workflows.
Start here¶
The getting-started guide fits a complete analysis and shows how to inspect its output. Continue with the guide matching your input:
Read input data and row decisions before building a pipeline around exclusions or mixed DataFrame/array inputs.
Before selecting a model, read choosing methods. Binary analyses with sparse data should also review zero-event studies.
After fitting a model, continue with sensitivity analysis and provenance and reporting to assess stability and create an auditable export.
The statistical methods page is the formula- level implementation contract. Validation explains the R cross-software fixtures and CI layers, while scope and limitations lists unsupported methods explicitly.
Design principles¶
- Inputs and exclusions are explicit rather than silently repaired.
- Model-scale results remain separate from display-scale transformations.
- Resolved method settings are stored on every result.
- Versioned provenance records inputs, row decisions, and transformations.
- Reports provide detached dictionaries, strict JSON, and Markdown.
- Plotting is optional and never calls
show(). - Numerical implementations are independent and tested against hand calculations and external reference results.
Project status¶
PyMetaAnalysis 0.3.0 adds study-level Meta-regression with numeric, explicitly encoded categorical, and multiple moderators; common- and mixed-effects models; coefficient inference and prediction; and optional bubble plots. The project has not undergone a formal external statistical audit. Pin the package version for consequential work and independently check important analyses. See the repository changelog and contribution guide. For manuscripts and archived analyses, see citing PyMetaAnalysis.