Medical Statistics Analysis (analyze-stats)
Generates and runs reproducible Python/R analyses for medical research and returns publication-ready tables, figures and Results text.
Data & AnalyticsAdvanced★ 401⑂ 90AI score 9/10Last updated: Nov 23, 2026
What it does
- Profiles your data file first (shape, inferred types, missingness, unique values) and runs a PHI safety check before touching raw patient data.
- Detects the analysis type — Table 1, diagnostic accuracy/ROC, agreement (kappa, ICC, Bland–Altman), logistic/linear regression, survival and competing risks, propensity scores (PSM/IPTW/overlap), repeated measures (LMM/GEE), survey-weighted designs (KNHANES/NHANES), meta-analysis, mediation, MR, PRS — then proposes a plan and waits for your approval.
- Enforces reporting discipline: fixed random seed, every reported number traced to script output, exact p-values, 95% CIs, effect sizes, multiplicity correction, no post-hoc power, and plain-language translation (absolute risk difference, NNT).
- Guards against classic reviewer traps: complete/quasi separation screening, structural zeros that must not be imputed, over-adjustment and collider bias in cross-sectional models, reverse-coded Likert items.
- Emits journal-styled tables (Radiology/JAMA/NEJM/Lancet profiles) as CSV + markdown + gtsummary code, figures as PDF and 300-DPI PNG, plus an
_analysis_outputs.mdmanifest for downstream writing skills.
Who it's for
- Clinical, radiology and public-health researchers, residents and graduate students writing papers.
- Anyone who needs a reproducible, auditable stats workflow rather than ad-hoc scripts.
- Teams preparing a manuscript that must match a target journal's table and reporting format.
Example uses
- "Build Table 1 from cohort.csv for Radiology" → picks mean(SD) vs median(IQR) by skewness and outputs an AMA-style table plus gtsummary code.
- "Logistic regression for a pathognomonic imaging sign predicting IDH mutation" → runs the separation check first and recommends Firth penalisation or a two-stage rule when a cell is empty.
- "Cox model with propensity score weighting" → reads the propensity-score guide, reports HR with CI, balance diagnostics, and absolute risk / NNT framing.
· · · 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 AI 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 /tmp/medsci-skills && mkdir -p ~/.claude/skills && cp -r /tmp/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 the whole skill directory (the references/ and scripts/ subfolders are required):
cp -r medsci-skills/skills/analyze-stats ~/.claude/skills/ - Install Python dependencies:
pip install numpy pandas scipy statsmodels matplotlib lifelines - Restart Claude Code and ask something like "run statistical analysis on this CSV" or "make a Table 1".
- De-identify your dataset before analysis if it still contains patient identifiers.
View source on GitHub ↗License: MIT