Statistical analysis with the Stats Agent
Axelium's Stats Agent is a conversational tool orchestrator that runs pooled meta-analyses, sensitivity checks, and publication bias assessments using R/metafor — then helps you interpret the results and pin evidence for your report.
Overview
The Stats Agent lives in the Analysis tab of each project. Type a natural-language request — for example "Run a random-effects meta-analysis for pCR" — and the agent selects the right tool, executes R code via metafor, and returns a forest plot with heterogeneity metrics. Every number it reports comes directly from a tool call; it never invents statistics.

Analysis types
The agent provides quick-prompt buttons based on how many studies (k) are available for a given outcome and timepoint.
| Analysis | Minimum k | What it does |
|---|---|---|
| Pooled meta-analysis | 2 | Fixed-effect or random-effects pooling with forest plot, I², τ², and Q statistic. |
| Sensitivity analysis | 3 | Leave-one-out, alternative τ² estimators, and Knapp-Hartung adjustment. |
| Publication bias | 3 | Egger's regression, Begg's rank test, trim-and-fill, and funnel plot. |
| Subgroup analysis | 4 | Split pooling by a categorical variable with Q-between test for subgroup differences. |
| Meta-regression | 4 | Linear regression of effect size on a continuous covariate. |
Pooled meta-analysis
The core analysis pools study-level effect sizes into a single summary estimate. You can choose between fixed-effect (assumes a common true effect) and random-effects (allows effects to vary across studies) models. The default τ² estimator is REML, but the agent can switch to DL, HS, SJ, PM, HE, ML, or EB on request.
Every pooled analysis returns:
- Pooled estimate and 95% CI — the summary effect on the scale of your chosen measure (RR, OR, HR, MD, SMD, or proportion).
- Forest plot — SVG visualisation of each study's weight and the diamond summary.
- Heterogeneity metrics — I², τ², Q statistic, and their interpretation.

Understanding heterogeneity
Heterogeneity measures how much variability across studies exceeds what you would expect from sampling error alone.
- I² — percentage of total variability due to between-study differences. Low (<25%), moderate (25–75%), or high (>75%).
- τ² — absolute between-study variance on the log scale (for ratio measures). Useful for comparing heterogeneity across analyses.
- Cochran's Q — chi-squared test for heterogeneity. A low p-value (p < 0.05) suggests real differences between studies.
The agent always reports I² and τ² and flags the heterogeneity level. If heterogeneity is high, consider running subgroup analysis or meta-regression to investigate sources of variation.
Sensitivity analysis
Sensitivity analysis tests whether your results are robust to analytical decisions. The agent supports three approaches, run individually or together:
Leave-one-out
Re-runs the pooled analysis k times, each time dropping one study. If removing a single study shifts the estimate substantially or changes statistical significance, that study has outsized influence and warrants closer inspection.
Estimator comparison
Re-runs the analysis with each of 8 τ² estimators (REML, DL, HS, SJ, PM, HE, ML, EB). If the pooled estimate is stable across estimators, the result is robust to the choice of heterogeneity method.
Knapp-Hartung adjustment
Applies a t-distribution instead of the normal distribution for confidence intervals — a more conservative approach when the number of studies is small. The agent returns the adjusted CI, t-value, degrees of freedom, and p-value.
Publication bias assessment
Publication bias occurs when studies with significant results are more likely to be published, skewing the pooled estimate. The agent runs four complementary tests:
- Egger's regression — weighted least-squares regression of effect sizes on standard errors. A significant intercept (p < 0.05) suggests funnel plot asymmetry.
- Begg's rank correlation (k ≥ 4) — Kendall's τ rank correlation between effects and standard errors.
- Trim-and-fill — imputes "missing" studies and recalculates the pooled estimate, showing how much publication bias might shift your result.
- Funnel plot — scatter of each study's effect vs. precision. Asymmetry suggests bias; the plot includes 95% and 99% confidence envelopes.
Power caveat: All publication bias tests have low statistical power when k < 10 (Sterne et al., 2011). The agent flags this automatically. Non-significant results in small meta-analyses do not rule out bias.
Subgroup analysis and meta-regression
Subgroup analysis
Split the pooled analysis by a categorical variable (e.g., region, risk of bias, treatment line). The agent uses study tags — either pre-extracted during data collection or classified on the fly via LLM-based tagging. The result includes a per-subgroup pooled estimate and a Q-between test for subgroup differences.
Meta-regression
Fit a linear regression of effect size on a continuous covariate (e.g., median age, baseline risk). The agent returns the slope (β), standard error, and p-value. A significant β suggests the covariate partially explains heterogeneity.
Note: Subgroup analysis and meta-regression are currently available in interactive (browser) mode only. Server-side execution supports pooling, sensitivity, and publication bias but not subgroup or meta-regression.
Pinning results to the Evidence Board
Every forest plot and analysis result can be pinned to the Evidence Board with a single click. Pinned evidence appears in the Reports & Evidence tab and can be included directly when generating your final report. The agent creates two artifacts per analysis: a plot artifact (the SVG forest plot) and a model artifact (numeric results as JSON). Both can be pinned independently.
Data exploration tools
Before running an analysis, the agent can inspect the dataset to help you decide what to analyse. These tools are available in the conversation:
- List dimensions — discovers all outcome/timepoint combinations and how many studies (k) are available for each.
- Preview missingness — checks for missing data fields and flags studies that would be excluded from a given analysis.
- Query data — browse, filter, and sort the extracted data table with arbitrary queries.
- Read source documents — look up parsed table assets, document sections, or registry data for specific studies.
- Classify studies — create ad-hoc categorical tags (e.g., region, line of therapy) via LLM for use in subgroup analysis.
Tips for working with the Stats Agent
- Start with the quick-prompt buttons — they encode the right tool and minimum-k checks automatically.
- If you have multiple timepoints for an outcome, specify which one (e.g., "pCR at 12 months"). The agent will ask if ambiguous.
- For subgroup analysis, the agent can classify studies on the fly. Just ask: "Run subgroup analysis by region."
- Pin your key forest plots and sensitivity results as you go — they are easier to find later on the Evidence Board than scrolling through chat history.
- The agent never outputs raw R code. If you need to reproduce the analysis outside Axelium, export the extracted dataset and run metafor manually.