Medical Research Statistical Analysis (analyze-stats)
Generates and runs reproducible Python/R analyses for medical research and outputs publication-ready tables, figures and manuscript text.
Data & AnalyticsAdvanced★ 332⑂ 78AI score 9/10Last updated: Oct 5, 2026
What it does
- Profiles your data file first (shape, inferred types, missingness per column, first rows, categorical levels) and pins down the analysis unit (patient, exam, lesion, rater).
- Proposes an analysis plan and waits for approval before executing, routing each request to a method guide and template: Table 1, diagnostic accuracy (Se/Sp/PPV/NPV/AUC), agreement (kappa, ICC, Bland–Altman), logistic/linear regression, survival and competing risks, propensity scores (PSM/IPTW/SIPTW/overlap), repeated measures (LMM/GEE), survey-weighted analyses (NHANES/KNHANES), meta-analysis, mediation, MR, PRS.
- Enforces reproducibility: seed 42, every reported number must come from executed output, a lint gate (
check_generated_code.py) that blocks missing seeds, hand-typed data literals, absolute paths and in-place overwrites of raw data, plus an_analysis_outputs.mdmanifest for downstream figure/paper skills. - Pre-screens classic pitfalls: complete/quasi separation before fitting, no Shapiro-Wilk gating (skewness rule instead), Welch by default, strata disjointness before trend tests, structural zeros (never-smoker pack-years), and collider/mediator over-adjustment in cross-sectional models.
- Produces reporting-ready output: exact p-values, 95% CIs on every primary estimand, effect sizes with plain-language IQR translations, absolute risk difference and NNT, calibration and decision-curve analysis, and journal-specific table styling (Radiology/JAMA/NEJM/Lancet) with gtsummary code.
- Handles privacy: prompts for de-identification before reading raw files and never prints PHI values.
Who it's for
- Clinical, radiology and public-health researchers writing their own papers.
- Research teams that need every manuscript number reproducible and reviewer-proof.
- Analysts working with complex survey data or claims/ICD-10 cohorts.
Example uses
- "Build Table 1 from cohort.csv" → variable/missingness report → mean (SD) vs median (IQR) chosen by skewness → CSV + markdown table + gtsummary code.
- "Fit a logistic model for IDH mutation" → separation screen on all categorical predictors → if a pathognomonic sign separates perfectly, it proposes Firth penalization or a two-stage rule in the plan instead of silently reporting a broken OR.
- "Compare my new imaging marker against the clinical model" → nested likelihood-ratio test on the new term, ΔC-statistic with CI, net-benefit/decision curve, and a drafted Results paragraph.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/Aperivue/medsci-skills/HEAD/skills/analyze-stats/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/analyze-stats folder from the GitHub repo Aperivue/medsci-skills into my ~/.claude/skills/analyze-stats/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/Aperivue/medsci-skills.git && mkdir -p ~/.claude/skills && cp -r medsci-skills/skills/analyze-stats ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/Aperivue/medsci-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy this skill:
cp -r medsci-skills/skills/analyze-stats ~/.claude/skills/ - Verify the bundled assets came along:
ls ~/.claude/skills/analyze-stats(expectreferences/andscripts/). - Install Python dependencies:
pip install pandas numpy scipy statsmodels matplotlib lifelines(add R withgtsummary,madaif you want R tables or DTA meta-analysis). - Restart Claude Code, open the folder containing your data, and ask something like "run the statistical analysis and build Table 1 from this CSV".
- If your file contains patient identifiers, de-identify it first and point the skill at the
*_deidentified.csvcopy.
View source on GitHub ↗License: MIT