Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/aperivue-analyze-stats
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/analyze-stats
What's inside
- Skill name
analyze-stats- Description
- Use when data needs statistical analysis. Runs reproducible Python/R code for Table 1, diagnostic accuracy, agreement, regression, survival, propensity score, survey-weighted and repeated-measures models, with publication tables. Sample size is /calc-sample-size; pooling studies is /meta-analysis.
- License
- MIT
- Metadata
- triggers: statistics, statistical analysis, analyze data, run stats, table 1, demographics table, ROC curve, agreement analysis, ICC, kappa, survival analysis, Kaplan-Meier, group comparison, logistic regression, linear regression, regression, propensity score, PSM, IPTW, SIPTW, overlap weighting, repeated measures, mixed model, GEE, longitudinal, survey weighted, KNHANES, NHANES, NHIS cohort, complex survey, wOR, weighted odds ratio, claims-based, ICD-10
- Instructions
- 425 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- files: referenced but missing: scripts/check_structural_zero.py
Files (83)
- SKILL.md
- agreement_reliability.md · references/analysis_guides/
- burden_decomposition_forecasting.md · references/analysis_guides/
- calibration.md · references/analysis_guides/
- diagnostic_accuracy.md · references/analysis_guides/
- health_economic_evaluation.md · references/analysis_guides/
- mediation.md · references/analysis_guides/
- mendelian_randomization.md · references/analysis_guides/
- meta_analysis.md · references/analysis_guides/
- missing_data.md · references/analysis_guides/
- multiplicity.md · references/analysis_guides/
- network_meta_analysis.md · references/analysis_guides/
- nhis_icd10_mapping.md · references/analysis_guides/
- polygenic_risk_score.md · references/analysis_guides/
- propensity_score.md · references/analysis_guides/
- regression.md · references/analysis_guides/
- repeated_measures.md · references/analysis_guides/
- survey_weighted.md · references/analysis_guides/
- survival.md · references/analysis_guides/
- test_selection.md · references/analysis_guides/
- analysis_run_workflow.md · references/
- figure_style.mplstyle · references/style/
- theme_publication.R · references/style/
- ajr.yaml · references/table-standards/journal-profiles/
- european_radiology.yaml · references/table-standards/journal-profiles/
- jama.yaml · references/table-standards/journal-profiles/
- lancet.yaml · references/table-standards/journal-profiles/
- nejm.yaml · references/table-standards/journal-profiles/
- radiology.yaml · references/table-standards/journal-profiles/
- table-standards.md · references/table-standards/
- agreement.md · references/table-standards/table-types/
- diagnostic_accuracy.md · references/table-standards/table-types/
- incremental_value.md · references/table-standards/table-types/
- meta_analysis.md · references/table-standards/table-types/
- model_comparison.md · references/table-standards/table-types/
- reader_study.md · references/table-standards/table-types/
- regression_results.md · references/table-standards/table-types/
- survival_results.md · references/table-standards/table-types/
- table1_demographics.md · references/table-standards/table-types/
- tool-comparison.md · references/table-standards/
- agreement_analysis.py · references/templates/
- dca_plot.R · references/templates/
- diagnostic_accuracy.py · references/templates/
- dta_meta_analysis.R · references/templates/
- forest_plot.py · references/templates/
- likert_summary.py · references/templates/
- meta_analysis.R · references/templates/
- propensity_score.py · references/templates/
- regression.py · references/templates/
- repeated_measures.py · references/templates/
- sample_size.R · references/templates/
- survey_weighted_analysis.py · references/templates/
- survival_analysis.py · references/templates/
- table1_demographics.py · references/templates/
- README.md · scripts/analysis_run_challenge/
- verify.sh · scripts/analysis_run_challenge/
- check_generated_code.py · scripts/
- check_separation.py · scripts/
- demo_analysis_run.py · scripts/
- rating_monotonicity.py · scripts/
- …and 23 more
SKILL.md (first lines)
# Statistical Analysis Skill
Generate reproducible code (Python preferred, R when necessary) for medical research analyses,
run it, and produce publication-ready tables and figures from its output.
## Data Privacy Check
Before reading any data file, check whether it might contain Protected Health Information (PHI):
1. If `*_deidentified.*` files exist in the working directory, use those.
2. If only raw CSV/Excel files exist, ask the user whether the data contain patient identifiers
(names, national ID / RRN, contact details); if so, have them de-identify it first with
`/deidentify`.
3. Proceed once the user confirms the data are de-identified or contain no PHI.
4. **NEVER** display raw PHI values (names, phone numbers, RRN) in your output, because console
output is copied into transcripts and drafts. If you encounter them, warn the user and suggest
`/deidentify`.
## Reference Files
- `${CLAUDE_SKILL_DIR}/references/templates/` — reusable analysis scripts; read the matching one
before generating code.
- `${CLAUDE_SKILL_DIR}/references/analysis_guides/` — methodology guides; the Phase 2 table says
which to read.
- `${CLAUDE_SKILL_DIR}/references/table-standards/` — `table-standards.md` (universal and AMA
rules, footnote order, gtsummary pipeline), `journal-profiles/` (YAML per journal: radiology,
jama, nejm, lancet, european_radiology, ajr), `table-types/` (one template per table type),
`tool-comparison.md` (R/Python table tools).
- `${CLAUDE_SKILL_DIR}/references/style/figure_style.mplstyle` — figure style.
## Workflow
### Phase 1: Data Assessment
1. **Read the data file** (CSV, Excel, TSV, or other tabular format).
2. **Report to the user**: shape (rows x columns); column names and inferred types (continuous,
categorical, ordinal, binary, datetime); missing values per column (count and percentage);
first 5 rows; unique value counts for categorical columns.
3. **Identify the analysis unit**: patient, exam, lesion, image, rater, study, etc.
4. If a variable name or coding is uncertain, write `[VERIFY: variable_name]` and ask the user to
confirm it against the data dictionary; never guess a column name or coding.
### Phase 2: Analysis Plan
**Observational designs** (cohort, case-control, cross-sectional, registry, survey): before
planning, look for a `variable_operationalization.md` from `/define-variables` (or an equivalent
codebook-backed definition table). If none exists, warn the user and recommend running
`/define-variables` first, because exposure/outcome/covariate definitions and cutoffs invented
ad hoc from the data dictionary are a common reason reviewers reject observational work. This is
a warning, not a block: proceed on explicit user confirmation and record that the artifact was
not available.
Propose an analysis plan; the user decides the research question and endpoints. Mark any
clinical definition, cutoff, diagnostic criterion or guideline claim you could not confirm
`[VERIFY]`.
1. **Detect the analysis type** from the table in Analysis-Specific Guidelines, or accept the
user's specification.
2. **List the specific tests** to be performed.
3. **Identify primary and secondary endpoints**.
4. **State the assumptions** that will be checked (normality, homogeneity, independence).
5. **Note data cleaning** needed (recoding, outlier handling, missing-data strategy).
6. **Anchor the estimand to the research question.**
- Interaction, synergy or effect modification: the primary estimand is the **interaction
parameter itself** (a likelihood-ratio test of the interaction term, or the interaction
OR/HR on one stated scale) — not a main-effect OR whose CI is then read as "no synergy". A
public-health or biological **synergy** claim is additive-scale: report **RERI**, **AP** or
**S**, each with a CI (R `interactionR` / `epiR`; Knol & VanderWeele reporting), not only a
multiplicative product term, because a non-significant multiplicative interaction is
compatible with a large additive one (and vice versa). Joint categories (high/high vs
low/low) show joint association, not interaction; "stronger in A than in B" from separate
stratum estimates is the difference-in-significance fallacy — report the formal interaction
term.
- Equivalence or non-inferiority: declare the margin up front (a TOST procedure, or the CI
compared against a pre-stated MCID); a non-significant difference is not equivalence
without a margin.
7. **Screen every categorical/binary predictor for separation before fitting anything.** A
predictor that perfectly predicts the outcome has no finite MLE, and the failure is silent:
`glm` returns an odds ratio near 0 (or enormous), *p* ≈ 0.99, and an AUC that ends up in a
table. Pathognomonic imaging signs (T2-FLAIR mismatch, the string sign, a halo sign) cause
it routinely: 100% specificity means an empty cell by construction.
```bash
python3 "${CLAUDE_SKILL_DIR}/scripts/check_separation.py" \
--data cohort.csv --outcome idh_mutant --auto --strict
```
`COMPLETE_SEPARATION` (an empty cell) and `QUASI_SEPARATION` (a cell below the sparsity
floor) both halt the plan. With two or more predictors the script also tests them jointly
(a linear combination can separate the outcome when no single predictor does); that test
needs scipy, and without it the report says the joint check was not run. The remedy is a **design** decision, made in the plan: Firth's
penalised likelihood keeps one model, while a **two-stage rule** — classify the sign-positive
cases directly, model only the sign-negative remainder — is usually the clinically meaningful
choice for a pathognomonic sign, because a sign-positive patient is already diagnosed.
Present the plan and **wait for user approval** before executing.
### Phase 3: Execute
Generate and run a Python (preferred) or R script. Every number you report **MUST** come from
its executed output, never estimated or hand-typed, because a number no script reproduces cannot
be verified.
#### Script Structure
Start every script with a reproducibility header:
```python
"""
Analysis: {description}
Date: {YYYY-MM-DD}
Random seed: 42
Python: {version}
Key packages: {package==version, ...}
"""
import numpy as np
import pandas as pd
np.random.seed(42)
```From Aperivue/medsci-skills, MIT.
More from Aperivue/medsci-skills
- 0.779score
design-ai-benchmarking
Aperivue
Use when designing a study that benchmarks AI systems against a human-expert panel, before data collection.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
define-variables
Aperivue
Use when exposure, outcome, covariate or eligibility definitions and cutoffs need a citable basis before the protocol.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
deidentify
Aperivue
Use when clinical data may contain PHI and must be de-identified before any LLM-assisted analysis.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
academic-aio
Aperivue
Use when a medical AI paper should be found and cited by AI search engines and RAG tools.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
add-journal
Aperivue
Use when a target journal has no profile yet.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
calc-sample-size
Aperivue
Use when planning how many patients or cases a study needs before data collection (power analysis, IRB justification).
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
author-strategy
Aperivue
Use when analyzing a researcher's publication record from PubMed.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
review-paper
Aperivue
Use when writing a literature review article (narrative, scoping PRISMA-ScR or systematic).
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
check-reporting
Aperivue
Use when auditing a manuscript item by item against a reporting guideline or risk-of-bias tool.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
clean-data
Aperivue
Use when a clinical CSV/Excel dataset needs profiling and cleaning before analysis (missing values, outliers, duplicates, type mismatches).
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
contribute
Aperivue
Use when sending local changes back to the project (an added journal profile, a fixed checklist item, an adapted skill) or reporting a false positive or bug.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
design-study
Aperivue
Use when checking a radiology or medical AI study design before drafting or submission.
SkillAFreshness: A★ 349Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 349
- Forks
- 83
- Open issues
- 4
- Last commit (this folder)
- Oct 4, 2026 (24 days ago)
- Last release
- Oct 4, 2026 (23 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Aperivue/medsci-skills
- Website
- aperivue.com/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Aperivue
- 0.779score
review-paper
Aperivue
Use when writing a literature review article (narrative, scoping PRISMA-ScR or systematic).
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
author-strategy
Aperivue
Use when analyzing a researcher's publication record from PubMed.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
academic-aio
Aperivue
Use when a medical AI paper should be found and cited by AI search engines and RAG tools.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
add-journal
Aperivue
Use when a target journal has no profile yet.
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
calc-sample-size
Aperivue
Use when planning how many patients or cases a study needs before data collection (power analysis, IRB justification).
SkillAFreshness: A★ 349Claude Code +9 - 0.779score
check-reporting
Aperivue
Use when auditing a manuscript item by item against a reporting guideline or risk-of-bias tool.
SkillAFreshness: A★ 349Claude Code +9
Cite this page
analyze-stats skill. Agent Mart. https://agentmart.dev/skills/aperivue-analyze-stats (last updated 2026-10-24)