{"id":"99d34c56-da8c-4126-b296-ff93bc9b6449","shortId":"xxK9xg","kind":"skill","title":"analyze-stats","tagline":"Statistical analysis for medical research papers. Generates reproducible Python/R code with publication-ready tables and figures. Supports diagnostic accuracy, inter-rater agreement, meta-analysis, survival analysis, survey data, group comparisons, regression, propensity score, a","description":"# Statistical Analysis Skill\n\nYou are assisting a medical researcher with statistical analyses for medical research papers.\nGenerate reproducible code (Python preferred, R when necessary) that produces publication-ready\ntables and figures following journal standards for medical imaging research.\n\n## Data Privacy Check\n\nBefore reading any data file, check whether it might contain Protected Health Information (PHI):\n\n1. If `*_deidentified.*` files exist in the working directory, use those preferentially.\n2. If only raw CSV/Excel files exist (no `*_deidentified.*` counterpart), warn the user:\n   > \"이 데이터에 환자 식별정보(이름, 주민번호, 연락처 등)가 포함되어 있습니까?\n   > 포함된 경우 `/deidentify` 스킬로 먼저 비식별화를 진행해주세요.\"\n3. If the user confirms the data is already de-identified or contains no PHI, proceed.\n4. **NEVER** display raw PHI values (names, phone numbers, RRN) in your output. If you\n   encounter them while reading data, warn the user and suggest running `/deidentify`.\n\n## Reference Files\n\n- **Templates**: `${CLAUDE_SKILL_DIR}/references/templates/` -- reusable analysis scripts\n- **Analysis guides**: `${CLAUDE_SKILL_DIR}/references/analysis_guides/` -- on-demand methodology references\n- **Table standards**: `${CLAUDE_SKILL_DIR}/references/table-standards/` -- journal-specific table formatting\n  - `table-standards.md` -- universal rules, AMA rules, footnote system, mistakes checklist\n  - `journal-profiles/` -- YAML profiles per journal (radiology, jama, nejm, lancet, eur_rad, ajr)\n  - `table-types/` -- templates per table type (Table 1, diagnostic accuracy, regression, meta-analysis, model comparison)\n  - `tool-comparison.md` -- R/Python tool comparison and recommended pipelines\n- **Figure style**: `${CLAUDE_SKILL_DIR}/references/style/figure_style.mplstyle`\n- **Project data**: See CLAUDE.md for data locations under `2_Data/`\n\nRead relevant templates before generating analysis code. For complex analysis types\n(regression, propensity score, repeated measures), also load the corresponding guide\nfrom `analysis_guides/` to ensure correct methodology and reporting.\n\n## Workflow\n\n### Phase 1: Data Assessment\n\n1. **Read the data file** (CSV, Excel, TSV, or other tabular format).\n2. **Report to the user**:\n   - Shape (rows x columns)\n   - Column names and inferred types (continuous, categorical, ordinal, binary, datetime)\n   - Missing values per column (count and percentage)\n   - First 5 rows preview\n   - Unique value counts for categorical columns\n3. **Identify the analysis unit**: patient, exam, lesion, image, rater, study, etc.\n\n### Phase 2: Analysis Plan\n\nBased on the data structure and research question, propose an analysis plan:\n\n1. **Auto-detect analysis type** from the table below, or accept user specification.\n2. **List specific tests** to be performed.\n3. **Identify primary and secondary endpoints**.\n4. **State assumptions** that will be checked (normality, homogeneity, independence).\n5. **Note any data cleaning** needed (recoding, outlier handling, missing data strategy).\n\nPresent the plan and **wait for user approval** before executing.\n\n| Type | When to use | Python packages | R packages | Primary output |\n|------|-------------|-----------------|------------|----------------|\n| Table 1 (Demographics) | Baseline characteristics | pandas, scipy | tableone | Demographics table |\n| Diagnostic Accuracy | Sensitivity/specificity/AUC | sklearn, scipy | pROC | ROC curve, performance table |\n| Inter-rater Agreement | Multiple raters rating same items | krippendorff, pingouin | irr, psych | ICC/Kappa table |\n| Meta-analysis | Pooling effect sizes across studies | -- | meta, metafor | Forest + funnel plots |\n| DTA Meta-analysis | Pooling diagnostic accuracy across studies | -- | meta, metafor, mada | SROC + paired forest plots |\n| Survey/Likert | Ordinal rating scales | pingouin, scipy | psych | Descriptive + reliability |\n| Survival | Time-to-event outcomes | lifelines | survival | KM curves, Cox table |\n| Group Comparison | Comparing 2+ groups | scipy, pingouin | -- | Test results + effect sizes |\n| Correlation | Association between variables | scipy, pingouin | -- | Scatter + correlation matrix |\n| Logistic Regression | Binary outcome + predictors | statsmodels, sklearn | -- | OR table, C-statistic, forest plot |\n| Linear Regression | Continuous outcome + predictors | statsmodels | -- | Coefficient table, R², diagnostic plots |\n| Propensity Score | Observational treatment comparison | sklearn, statsmodels | MatchIt, WeightIt, cobalt | Balance table, Love plot, weighted analysis |\n| Survey-Weighted | Complex survey data (KNHANES, NHANES, KCHS) | statsmodels | survey, tableone, gWQS | Weighted Table 1, wOR table, subgroup results |\n| Repeated Measures | Longitudinal / multi-timepoint data | pingouin, statsmodels | lme4, nlme, geepack | Spaghetti plot, LMM/GEE/RM ANOVA results |\n\nFor **Logistic Regression**, **Linear Regression**, **Propensity Score**, **Survey-Weighted**, and **Repeated Measures**:\nload the corresponding guide from `${CLAUDE_SKILL_DIR}/references/analysis_guides/` before generating code.\nFor **Survey-Weighted** analysis, also load `survey_weighted.md`. For NHIS claims-based studies, load `nhis_icd10_mapping.md`.\nFor test selection guidance, load `${CLAUDE_SKILL_DIR}/references/analysis_guides/test_selection.md`.\n\n### Phase 3: Execute\n\nGenerate and run a Python (preferred) or R script following these rules:\n\n#### Script Structure\n\nEvery script MUST start with a reproducibility header:\n\n```python\n\"\"\"\nAnalysis: {description}\nDate: {YYYY-MM-DD}\nRandom seed: 42\nPython: {version}\nKey packages: {package==version, ...}\n\"\"\"\nimport numpy as np\nimport pandas as pd\nnp.random.seed(42)\n```\n\n#### Execution Rules\n\n1. **Random seed**: Always `np.random.seed(42)` or `set.seed(42)`.\n2. **Figure style**: Always load the matplotlib style file:\n   ```python\n   import matplotlib.pyplot as plt\n   style_path = os.path.join(os.environ.get('CLAUDE_SKILL_DIR', '.'), 'references/style/figure_style.mplstyle')\n   if os.path.exists(style_path):\n       plt.style.use(style_path)\n   ```\n3. **Output files**: Save all outputs to the same directory as the input data, or to a\n   user-specified output directory.\n4. **Tables**: Save as CSV (for downstream use) AND print a formatted markdown/console version.\n5. **Figures**: Save as both PDF (vector) and PNG (300 DPI).\n6. **Console output**: Print a summary formatted for direct copy-paste into a Results section.\n\n#### Assumption Checking\n\nBefore running parametric tests, always check and report:\n\n- **Normality**: Shapiro-Wilk test (n < 50) or Kolmogorov-Smirnov (n >= 50), plus visual QQ plot\n- **Homogeneity of variance**: Levene's test\n- **If assumptions violated**: Use non-parametric alternatives and report why\n\n#### Multiple Comparisons\n\n- If running 3+ tests on the same dataset, apply Bonferroni or Benjamini-Hochberg correction.\n- Always report both uncorrected and corrected p-values.\n- State the correction method used.\n\n#### Output Manifest\n\nAfter all analyses complete, save a manifest file `_analysis_outputs.md` in the output directory:\n\n```markdown\n# Analysis Outputs\nGenerated: {YYYY-MM-DD}\nStudy type: {detected or user-specified type}\n\n## Tables\n- `table1_demographics.csv` -- Baseline characteristics\n- `diagnostic_accuracy_table.csv` -- Performance metrics with 95% CIs\n\n## Figures  \n- `roc_curve.pdf` / `roc_curve.png` -- ROC curves (vector / 300 DPI)\n\n## Data\n- `predictions.csv` -- Per-subject model predictions with ground truth\n```\n\nThis manifest enables downstream skills (`/make-figures`, `/write-paper`) to auto-discover analysis outputs without user intervention.\n\n### Phase 4: Report\n\nAfter execution, generate manuscript-ready text:\n\n1. **Results paragraph**: 3-8 sentences with specific numbers, formatted as:\n   - Continuous: \"mean +/- SD\" or \"median (IQR)\"\n   - Proportions: \"n/N (XX.X%)\"\n   - Test results: \"statistic = X.XX, p = 0.XXX\"\n   - Effect sizes: \"Cohen's d = X.XX (95% CI: X.XX-X.XX)\"\n   - AUC: \"AUC = 0.XXX (95% CI: 0.XXX-0.XXX)\"\n2. **Table/figure captions**: Draft captions referencing table/figure numbers.\n3. **Methods snippet**: 2-3 sentences describing the statistical methods used, suitable for\n   the Methods section.\n\n## Statistical Reporting Rules (Always Enforced)\n\nThese rules apply to ALL analyses without exception:\n\n1. **Exact p-values**: Report exact values (e.g., p = 0.034), not inequalities.\n   Exception: report as p < 0.001 when the value is below 0.001.\n2. **Confidence intervals**: Always report 95% CIs for primary endpoints.\n3. **Effect sizes**: Report alongside every p-value (Cohen's d, eta-squared, odds ratio,\n   risk ratio, etc., as appropriate).\n4. **Parametric vs non-parametric**: Choose based on assumption checks, not convenience.\n   Report the assumption test results.\n5. **Multiple comparisons**: Apply and explicitly report the correction method when\n   performing 3+ comparisons.\n6. **Sample size reporting**: Always state n for each group/analysis.\n7. **Missing data**: Report how many cases were excluded and why.\n8. **Decimal places**: p-values to 3 decimals, proportions to 1 decimal, means/SDs to\n   appropriate precision for the measurement.\n\n## Error Handling\n\n- If a script fails to execute, report the error in one line, diagnose the likely cause\n  (missing package, data format mismatch, wrong column name), and present a fix.\n- Do NOT retry the same script more than once without modifying it or asking the user.\n- If an R package is unavailable, suggest `install.packages()` and wait for user confirmation.\n- For prediction models: always include calibration assessment (Brier score, calibration plot,\n  or calibration slope/intercept) alongside discrimination metrics. AUC alone is insufficient.\n\n## Output Conventions\n\n### Tables\n\n**Before generating any publication table**, load the journal profile and table type template:\n1. Load `${CLAUDE_SKILL_DIR}/references/table-standards/journal-profiles/{journal}.yaml` if a target journal is known\n2. Load `${CLAUDE_SKILL_DIR}/references/table-standards/table-types/{type}.md` for the relevant table type\n3. If no journal specified, default to AMA style (Radiology profile)\n\n**Output formats** (always generate all three):\n- CSV file (for downstream use and archival)\n- Console markdown rendering (for user review)\n- R gtsummary code (for publication-quality Word/LaTeX export)\n\n**Universal rules** (enforced regardless of journal):\n- No vertical lines — horizontal rules only (top, below header, bottom)\n- Binary variables: show only one level (e.g., Male only, not Male + Female)\n- Units in column headers, not repeated in cells\n- Consistent decimal places within each column\n- All abbreviations defined in footnotes, self-contained per table\n- Exact P values always (never \"NS\" or \"significant\")\n- Name the statistical test in footnote or general note\n- Variability measure always stated: mean (SD) or median (IQR)\n\n**Journal-specific parameters** (from loaded YAML profile):\n- Footnote markers: letters (AMA) vs symbols (NEJM/Lancet)\n- P value format: case, leading zero, italic\n- CI separator: comma (Radiology) vs \"to\" (JAMA/NEJM/Lancet)\n- Title format: period (AMA) vs colon (Lancet)\n- Abbreviation order: appearance (Radiology) vs alphabetical (JAMA)\n\n**Footnote placement order** (universal):\n1. General note (no marker) — e.g., \"Data are mean (SD) unless noted\"\n2. Abbreviations — in order per journal convention\n3. Specific notes (superscript markers) — per-cell explanations\n4. Probability notes — significance thresholds (if applicable)\n\n**gtsummary pipeline** (recommended for R table generation):\n```r\ntheme_gtsummary_journal(\"{journal}\")  # \"jama\", \"lancet\", \"nejm\"\ntheme_gtsummary_compact()\n# ... build table ...\ntbl %>% as_flex_table() %>% flextable::save_as_docx(path = \"table.docx\")\n```\n\n**Validation checklist** (run before finalizing any table):\n- [ ] Binary variables show only one level\n- [ ] Units in headers, not cells\n- [ ] Consistent decimal places per column\n- [ ] Statistical test named (footnote or general note)\n- [ ] Effect sizes per clinically meaningful unit (per 10 years, not per 1 year)\n- [ ] Reference category stated for categorical predictors\n- [ ] No \"NS\" — exact P values only\n- [ ] Abbreviations defined in footnotes\n\n### Figures\n\n- Format: PDF (vector, for journal) + PNG (300 DPI, for review)\n- Style: Use `figure_style.mplstyle` for consistent appearance\n- Font: Arial, 8-10pt\n- Colors: Colorblind-safe palette\n- Size: 3.5 inches (single column) or 7.0 inches (double column) width\n- Always include axis labels with units\n\n### Console Output\n\n- Formatted for direct copy-paste into the Results section of a manuscript\n- Include all numbers that would appear in the text\n- Use the reporting format conventions above\n\n## Analysis-Specific Guidelines\n\n### Table 1 (Demographics)\n\n- Template: `references/templates/table1_demographics.py`\n- Table type guide: `references/table-standards/table-types/table1_demographics.md`\n- Continuous variables: mean +/- SD if normal, median (IQR) if skewed\n- Categorical variables: n (%)\n- Binary variables: show only one level (e.g., Male n (%), not both Male and Female)\n- Compare groups: t-test/Mann-Whitney for continuous, chi-square/Fisher for categorical\n- Report standardized mean differences (SMD) if requested (preferred over P for PS-matched studies)\n- RCTs: P values in Table 1 are usually unnecessary per CONSORT\n- gtsummary `tbl_summary()` with journal theme for R pipeline\n\n### Diagnostic Accuracy\n\n- Template: `references/templates/diagnostic_accuracy.py`\n- Always report: sensitivity, specificity, PPV, NPV, accuracy, AUC\n- CIs: Wilson score for proportions, DeLong for AUC\n- ROC curve: include diagonal reference line, AUC in legend\n- If comparing models: DeLong test for AUC comparison\n- Youden's index for optimal threshold when applicable\n- Include calibration assessment (Brier score, calibration plot) for prediction models\n- **NRI/IDI**: When comparing two models (e.g., base model vs model + AI score), report:\n  - Category-based NRI (with clinically defined risk categories)\n  - Continuous NRI (note: tends to be inflated — report alongside category-based)\n  - IDI (Integrated Discrimination Improvement)\n  - Bootstrap 95% CIs (1000+ iterations)\n  - These supplement, not replace, DeLong AUC comparison\n\n### Inter-rater Agreement\n\n- Template: `references/templates/agreement_analysis.py`\n- 2 raters + categorical: Cohen's kappa\n- 2+ raters + categorical: Fleiss' kappa (or Krippendorff's alpha)\n- Continuous: ICC (specify model: one-way, two-way random/mixed; type: single/average)\n- Always report interpretation labels (Landis & Koch or Cicchetti)\n- Bland-Altman plot for continuous paired measurements\n- Bootstrap CIs (1000 iterations, seed=42)\n\n### Meta-analysis\n\n- Prefer R (meta/metafor packages) for meta-analysis\n- **Comparative**: `metabin()` for binary outcomes (OR/RR), `metagen()` for continuous\n  - Use `method = \"Inverse\"`, `method.tau = \"DL\"`, `method.random.ci = \"HK\"`\n  - Avoid deprecated args: `comb.fixed` → `common`, `hakn` → `method.random.ci`\n- **Single-arm pooled proportion**: `metaprop()` with `sm = \"PLOGIT\"`, `method.ci = \"CP\"`\n- Heterogeneity: I-squared, Q test, tau-squared\n- Forest plot: individual studies + pooled estimate\n- Funnel plot + Egger's test for publication bias (note: underpowered k<10)\n- Sensitivity analysis: leave-one-out (`metainf()`)\n- Subgroup: `update(res, subgroup = variable)`\n\n### DTA Meta-Analysis\n\n- Template: `references/templates/dta_meta_analysis.R`\n- Prefer R (`mada`, `meta`, `metafor` packages) for DTA meta-analysis\n- **Bivariate model** (Reitsma): `mada::reitsma()` — recommended over separate pooling of Se/Sp\n  - Accounts for correlation between sensitivity and specificity\n  - Produces SROC curve with confidence + prediction regions\n- **Key outputs**: Pooled Se/Sp (95% CI), positive/negative LR, DOR, SROC AUC\n- **Threshold effect**: Spearman correlation between logit(Se) and logit(FPR)\n  - If significant: interpret single pooled Se/Sp with caution, emphasize SROC curve\n- **Forest plots**: Paired (sensitivity + specificity side by side)\n- **Publication bias**: Deeks' funnel plot asymmetry test (NOT standard funnel plot)\n  - Standard funnel plots are inappropriate for DTA studies\n  - Note: underpowered for k < 10\n- **Dual approach** (comparative + single-arm):\n  - Primary: `metabin()` for comparative studies (OR/RR)\n  - Secondary: `metaprop()` with `sm = \"PLOGIT\"` for single-arm pooled proportion\n  - Use `method = \"Inverse\"`, `method.tau = \"DL\"`, `method.random.ci = \"HK\"`\n- **Small studies (k < 10)**: bivariate model may not converge; consider narrative synthesis\n- **Alternative**: If `mada` unavailable, use `metafor::rma.mv()` with bivariate structure\n\n### Survey/Likert\n\n- Descriptive: median, IQR, frequency distribution per item\n- Internal consistency: Cronbach's alpha with item-total correlations\n- If comparing groups: Mann-Whitney or Kruskal-Wallis (ordinal data)\n- Visualization: diverging stacked bar chart\n\n### Survival Analysis\n\n- Kaplan-Meier curves with number-at-risk table\n- Log-rank test for group comparison\n- Cox proportional hazards: report HR (95% CI)\n- Check proportional hazards assumption (Schoenfeld residuals)\n- Report median survival with 95% CI\n- **Warranty period / T25**: Time to 25% cumulative incidence. Use `quantile()` from KM fit. If event rate < 25%, report \"not reached\" and consider Weibull parametric extrapolation for estimation\n\n### Interval-Censored Survival\n\nWhen exact event times are unknown (e.g., health screening cohorts where status changes are detected at periodic visits), standard KM underestimates time-to-event. Use interval-censored methods:\n\n- **R packages**: `icenReg` (parametric/semi-parametric IC regression), `interval` (NPMLE/Turnbull), `survival` (Surv type \"interval2\")\n- **Turnbull estimator**: Non-parametric MLE for interval-censored data — analogous to KM but accounts for the interval between last negative and first positive observation\n- **Parametric IC models**: Weibull or log-logistic via `icenReg::ic_par()`. Report shape/scale parameters and compare AIC across distributions\n- **Mid-point imputation**: Simple approximation — event time = midpoint of (last negative, first positive). Acceptable as sensitivity analysis but NOT as primary method\n- **When to use**: Serial measurement cohorts (e.g., health screening databases), cancer screening intervals, repeated biomarker assessments\n- **Reporting**: State the interval-censored nature of the data explicitly in Methods. Report both standard KM (for comparability with prior literature) and IC estimates (as primary or sensitivity)\n\n### Competing Risks\n\nWhen death or other events preclude the outcome of interest, standard KM overestimates cumulative incidence (treats competing events as censored). Use competing risk methods:\n\n- **R packages**: `cmprsk` (Fine-Gray), `tidycmprsk` (tidy interface), `survival` (cause-specific Cox)\n- **Cumulative incidence function (CIF)**: `cmprsk::cuminc()` — replaces 1-KM for each event type. Gray's test for group comparison\n- **Fine-Gray subdistribution hazard**: `cmprsk::crr()` or `tidycmprsk::crr()` — reports subdistribution HR (sHR) with 95% CI. Interpretable as effect on CIF directly\n- **Cause-specific Cox**: Standard Cox censoring competing events — reports cause-specific HR. Better for etiology; Fine-Gray better for prognosis/prediction\n- **When to use**: Mortality studies with multiple causes of death, cardiovascular events when non-CV death is frequent, any outcome where competing events are common (>5% of total events)\n- **Reporting**: Present CIF plots (NOT 1-KM) when competing risks exist. Report both cause-specific HR and subdistribution HR when the research question is etiologic. State which competing events were defined\n\n### Group Comparison\n\n- 2 independent groups: t-test or Mann-Whitney U\n- 2 paired groups: paired t-test or Wilcoxon signed-rank\n- 3+ independent groups: ANOVA or Kruskal-Wallis, with post-hoc\n- 3+ paired groups: repeated measures ANOVA or Friedman, with post-hoc\n- Always report: test statistic, degrees of freedom, p-value, effect size\n\n### Correlation\n\n- Pearson r (if bivariate normal) or Spearman rho (if not)\n- Report: coefficient, 95% CI, p-value\n- Scatter plot with regression line and CI band\n- For multiple variables: correlation matrix heatmap\n\n### Logistic Regression\n\n- **Guide**: Load `analysis_guides/regression.md` before generating code\n- **Template**: `references/templates/regression.py` (set `regression_type = \"logistic\"`)\n- Run univariable analysis first, then multivariable with clinically selected variables\n- Required outputs: OR table (univariable + multivariable), C-statistic (95% CI), Hosmer-Lemeshow\n- Check VIF < 5, EPV >= 10 (warn if violated)\n- Box-Tidwell test for continuous predictor linearity\n- Forest plot of adjusted ORs\n- NRI/IDI if comparing models (incremental value assessment)\n\n### Linear Regression\n\n- **Guide**: Load `analysis_guides/regression.md` before generating code\n- **Template**: `references/templates/regression.py` (set `regression_type = \"linear\"`)\n- Required outputs: coefficient table (β, 95% CI, P), R²/adjusted R², VIF\n- Always generate 4-panel diagnostic plot (residuals vs fitted, Q-Q, scale-location, leverage)\n- Check assumptions: normality of residuals, homoscedasticity, multicollinearity\n- Report both unstandardized β (primary) and standardized β (for effect size comparison)\n\n### Propensity Score\n\n- **Guide**: Load `analysis_guides/propensity_score.md` before generating code\n- **Template**: `references/templates/propensity_score.py`\n- Step 1: PS estimation (logistic regression)\n- Step 2: Apply method (matching with caliper = 0.2 × SD logit PS, IPTW/SIPTW with stabilized weights, or overlap weighting)\n- Step 3: Balance assessment — SMD < 0.10 for all covariates, Love plot mandatory\n- Step 4: Weighted/matched outcome analysis with robust SE\n- Step 5: Sensitivity analysis (E-value for unmeasured confounding)\n- Always state the estimand (ATE/ATT/ATO) explicitly\n- Recommend overlap weighting as default (no extreme weight issues)\n- **SIPTW**: Stabilized IPTW variant used in emulated target trial frameworks; report effective sample size\n\n### Survey-Weighted Analysis\n\n- **Guide**: Load `analysis_guides/survey_weighted.md` before generating code\n- **Template**: `references/templates/survey_weighted_analysis.py`\n- For KNHANES/NHANES/KCHS and similar complex survey designs\n- Always declare survey design (strata, cluster/PSU, weight) before analysis\n- Use correct weight variable (interview vs exam vs nutrition)\n- R `survey` package strongly recommended over Python for publication\n- Sequential model building: Model 1 (age+sex) → Model 2 (full adjustment)\n- Report weighted odds ratios (wOR) with 95% CI\n- Cross-national: analyze each country separately, never pool\n- Subgroup analysis: exclude the stratification variable from covariates\n\n### NHIS Claims-Based Studies\n\n- **Guide**: Load `analysis_guides/nhis_icd10_mapping.md` for disease definition patterns\n- Claims-based algorithms: N-claim rule, claim+medication, look-back period\n- Always specify ICD-10 code ranges, claim count requirement, and time windows\n- Charlson comorbidity index: cite Quan 2005 adaptation\n- Anchor covariates to most recent data prior to index date\n- Sensitivity analysis: test stricter/looser disease definitions\n\n### Repeated Measures\n\n- **Guide**: Load `analysis_guides/repeated_measures.md` before generating code\n- **Template**: `references/templates/repeated_measures.py`\n- Default method: **LMM** (handles missing data, no sphericity assumption)\n- RM ANOVA only if: no missing data AND few time points AND sphericity met\n- GEE for: population-averaged effects or non-normal outcomes\n- Always convert wide → long format first\n- **Time × Group interaction is the key result** — always report and interpret\n- Generate spaghetti plot (individual trajectories) + group mean trajectory plot\n- For LMM: report random effects structure, covariance structure (CS/AR1/UN), AIC/BIC\n- For RM ANOVA: report Mauchly's test, epsilon, correction method (Greenhouse-Geisser)\n- If missing > 5%: load `analysis_guides/missing_data.md` and apply MICE before analysis\n\n## Language\n\n- Code and output: English\n- Communication with user: Match user's preferred language\n- Medical terms: English only\n\n## What This Skill Does NOT Do\n\n- Does not fabricate or simulate data to fill gaps\n- Does not choose analysis endpoints -- the user decides the research question\n- Does not interpret clinical significance -- only statistical results\n- Does not replace biostatistician review for complex designs (e.g., adaptive trials)\n\n## Anti-Hallucination\n\n- **Never fabricate variable names, dataset column names, or variable codings.** If a variable mapping is uncertain, output `[VERIFY: variable_name]` and ask the user to confirm against the data dictionary.\n- **Never fabricate statistical results** — no invented p-values, effect sizes, confidence intervals, or sample sizes. All numbers must come from executed code output.\n- **Never generate references from memory.** Use `/search-lit` for all citations.\n- If a function, package, or API does not exist or you are unsure, say so explicitly rather than guessing.","tags":["analyze","stats","medsci","skills","aperivue","agent-skills","biostatistics","claude-code","claude-skills","clinical-research","diagnostic-accuracy","irb-protocol"],"capabilities":["skill","source-aperivue","skill-analyze-stats","topic-agent-skills","topic-biostatistics","topic-claude-code","topic-claude-skills","topic-clinical-research","topic-diagnostic-accuracy","topic-irb-protocol","topic-literature-review","topic-manuscript","topic-medical-ai","topic-medical-research","topic-meta-analysis"],"categories":["medsci-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Aperivue/medsci-skills/analyze-stats","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Aperivue/medsci-skills","source_repo":"https://github.com/Aperivue/medsci-skills","install_from":"skills.sh"}},"qualityScore":"0.499","qualityRationale":"deterministic score 0.50 from registry signals: · indexed on github topic:agent-skills · 98 github stars · SKILL.md body (25,219 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:56:28.547Z","embedding":null,"createdAt":"2026-05-13T12:57:43.684Z","updatedAt":"2026-05-18T18:56:28.547Z","lastSeenAt":"2026-05-18T18:56:28.547Z","tsv":"'-10':1645,3047 '-3':1060 '-8':1011 '/adjusted':2802 '/deidentify':135,183 '/fisher':1750 '/make-figures':986 '/mann-whitney':1744 '/references/analysis_guides':199,663 '/references/analysis_guides/test_selection.md':691 '/references/style/figure_style.mplstyle':268 '/references/table-standards':210 '/references/table-standards/journal-profiles':1315 '/references/table-standards/table-types':1329 '/references/templates':190 '/search-lit':3309 '/write-paper':987 '0.001':1102,1108 '0.034':1095 '0.10':2880 '0.2':2864 '0.xxx':1032,1044 '0.xxx-0.xxx':1047 '1':97,247,311,314,390,460,620,746,1007,1085,1205,1310,1501,1607,1704,1773,2498,2591,2852,2985 '10':1603,2020,2138,2172,2754 '1000':1884,1945 '2':109,277,326,375,404,547,755,1048,1059,1109,1324,1513,1899,1905,2620,2631,2858,2989 '2005':3061 '25':2269,2280 '3':140,362,411,693,784,895,1010,1056,1119,1171,1201,1337,1520,2643,2655,2876 '3.5':1653 '300':829,969,1632 '4':157,417,806,998,1141,1529,2807,2888 '42':727,743,751,754,1948 '5':353,427,820,1159,2582,2752,2896,3175 '50':863,869 '6':831,1173 '7':1183 '7.0':1658 '8':1194,1644 '95':961,1039,1045,1114,1882,2079,2250,2262,2525,2692,2745,2798,2998 'abbrevi':1419,1490,1514,1621 'accept':401,2397 'account':2061,2352 'accuraci':23,249,470,513,1789,1798 'across':500,514,2381 'adapt':3062,3244 'adjust':2769,2991 'age':2986 'agreement':27,482,1896 'ai':1853 'aic':2380 'aic/bic':3159 'ajr':238 'algorithm':3033 'alon':1291 'alongsid':1123,1287,1873 'alpha':1913,2203 'alphabet':1495 'alreadi':148 'also':295,672 'altern':887,2181 'altman':1937 'alway':749,758,853,908,1075,1112,1177,1276,1350,1431,1447,1663,1792,1927,2667,2805,2905,2954,3044,3124,3137 'ama':219,1344,1465,1486 'analog':2348 'analys':52,926,1082 'analysi':5,30,32,42,192,194,253,284,288,301,365,376,388,394,496,510,604,671,718,938,992,1700,1951,1959,2022,2036,2049,2227,2400,2715,2728,2782,2844,2891,2898,2937,2940,2962,3010,3024,3074,3083,3177,3183,3219 'analysis-specif':1699 'analysis_outputs.md':932 'analyz':2,3003 'analyze-stat':1 'anchor':3063 'anova':640,2646,2660,3100,3162 'anti':3247 'anti-hallucin':3246 'api':3318 'appear':1492,1641,1689 'appli':901,1079,1162,2859,3180 'applic':1535,1832 'approach':2140 'appropri':1140,1209 'approv':446 'approxim':2388 'archiv':1360 'arg':1978 'arial':1643 'arm':1985,2144,2159 'ask':1257,3270 'assess':313,1279,1835,2421,2777,2878 'assist':46 'associ':556 'assumpt':419,847,881,1150,1156,2255,2822,3098 'asymmetri':2120 'ate/att/ato':2909 'auc':1042,1043,1290,1799,1807,1814,1823,1891,2085 'auto':392,990 'auto-detect':391 'auto-discov':989 'averag':3117 'avoid':1976 'axi':1665 'back':3042 'balanc':599,2877 'band':2704 'bar':2224 'base':378,679,1148,1849,1858,1876,3020,3032 'baselin':462,955 'benjamini':905 'benjamini-hochberg':904 'better':2547,2553 'bias':2016,2116 'binari':343,566,1392,1573,1725,1963 'biomark':2420 'biostatistician':3238 'bivari':2050,2173,2189,2683 'bland':1936 'bland-altman':1935 'bonferroni':902 'bootstrap':1881,1943 'bottom':1391 'box':2759 'box-tidwel':2758 'brier':1280,1836 'build':1554,2983 'c':574,2743 'c-statist':573,2742 'calibr':1278,1282,1285,1834,1838 'calip':2863 'cancer':2416 'caption':1050,1052 'cardiovascular':2566 'case':1189,1472 'categor':341,360,1613,1722,1752,1901,1907 'categori':1610,1857,1864,1875 'category-bas':1856,1874 'caus':1231,2488,2534,2544,2563,2600 'cause-specif':2487,2533,2543,2599 'caution':2103 'cell':1411,1527,1583 'censor':2293,2323,2346,2427,2472,2539 'chang':2307 'characterist':463,956 'charlson':3056 'chart':2225 'check':82,88,423,848,854,1151,2252,2750,2821 'checklist':224,1567 'chi':1748 'chi-squar':1747 'choos':1147,3218 'ci':1040,1046,1476,2080,2251,2263,2526,2693,2703,2746,2799,2999 'cicchetti':1934 'cif':2494,2531,2588 'cis':962,1115,1800,1883,1944 'citat':3312 'cite':3059 'claim':678,3019,3031,3036,3038,3050 'claims-bas':677,3018,3030 'claud':187,196,207,265,660,688,773,1312,1326 'claude.md':272 'clean':431 'clinic':1599,1861,2733,3230 'cluster/psu':2959 'cmprsk':2479,2495,2515 'cobalt':598 'code':13,59,285,666,1369,2719,2786,2848,2944,3048,3087,3185,3258,3301 'coeffici':584,2691,2795 'cohen':1035,1128,1902 'cohort':2304,2411 'colon':1488 'color':1647 'colorblind':1649 'colorblind-saf':1648 'column':334,335,348,361,1238,1406,1417,1588,1656,1661,3254 'comb.fixed':1979 'come':3298 'comma':1478 'common':1980,2581 'communic':3189 'comorbid':3057 'compact':1553 'compar':546,1739,1818,1845,1960,2141,2148,2210,2379,2440,2773 'comparison':36,255,259,545,593,892,1161,1172,1824,1892,2244,2509,2619,2839 'compet':2451,2469,2474,2540,2578,2594,2614 'complet':927 'complex':287,608,2951,3241 'confid':1110,2072,3290 'confirm':144,1272,3274 'confound':2904 'consid':2178,2285 'consist':1412,1584,1640,2200 'consol':832,1361,1669 'consort':1778 'contain':92,153,1425 'continu':340,580,1018,1712,1746,1865,1914,1940,1968,2763 'conveni':1153 'convent':1295,1519,1697 'converg':2177 'convert':3125 'copi':841,1675 'copy-past':840,1674 'correct':305,907,913,919,1167,2964,3168 'correl':555,562,2063,2089,2208,2679,2708 'correspond':298,657 'count':349,358,3051 'counterpart':118 'countri':3005 'covari':2883,3016,3064,3156 'cox':542,2245,2490,2536,2538 'cp':1993 'cronbach':2201 'cross':3001 'cross-nat':3000 'crr':2516,2519 'cs/ar1/un':3158 'csv':319,810,1354 'csv/excel':113 'cuminc':2496 'cumul':2270,2466,2491 'curv':476,541,967,1809,2070,2106,2231 'cv':2571 'd':1037,1130 'data':34,80,86,146,176,270,274,278,312,317,381,430,437,610,631,797,971,1185,1234,1507,2220,2347,2431,3068,3095,3105,3212,3277 'databas':2415 'dataset':900,3253 'date':720,3072 'datetim':344 'dd':724,944 'de':150 'de-identifi':149 'death':2454,2565,2572 'decid':3223 'decim':1195,1202,1206,1413,1585 'declar':2955 'deek':2117 'default':1342,2915,3090 'defin':1420,1622,1862,2617 'definit':3028,3078 'degre':2671 'deidentifi':99,117 'delong':1805,1820,1890 'demand':202 'demograph':461,467,1705 'deprec':1977 'describ':1062 'descript':530,719,2192 'design':2953,2957,3242 'detect':393,947,2309 'diagnos':1228 'diagnost':22,248,469,512,587,1788,2809 'diagnostic_accuracy_table.csv':957 'diagon':1811 'dictionari':3278 'differ':1756 'dir':189,198,209,267,662,690,775,1314,1328 'direct':839,1673,2532 'directori':105,793,805,936 'discov':991 'discrimin':1288,1879 'diseas':3027,3077 'display':159 'distribut':2196,2382 'diverg':2222 'dl':1973,2166 'docx':1563 'dor':2083 'doubl':1660 'downstream':812,984,1357 'dpi':830,970,1633 'draft':1051 'dta':507,2033,2046,2132 'dual':2139 'e':2900 'e-valu':2899 'e.g':1093,1398,1506,1731,1848,2301,2412,3243 'effect':498,553,1033,1120,1596,2087,2529,2677,2837,2931,3118,3154,3288 'egger':2011 'emphas':2104 'emul':2926 'enabl':983 'encount':172 'endpoint':416,1118,3220 'enforc':1076,1378 'english':3188,3199 'ensur':304 'epsilon':3167 'epv':2753 'error':1214,1224 'estim':2008,2290,2338,2446,2854 'estimand':2908 'eta':1132 'eta-squar':1131 'etc':373,1138 'etiolog':2549,2611 'eur':236 'event':536,2278,2297,2319,2389,2457,2470,2502,2541,2567,2579,2585,2615 'everi':709,1124 'exact':1086,1091,1428,1617,2296 'exam':368,2969 'excel':320 'except':1084,1098 'exclud':1191,3011 'execut':448,694,744,1001,1221,3300 'exist':101,115,2596,3321 'explan':1528 'explicit':1164,2432,2910,3328 'export':1375 'extrapol':2288 'extrem':2917 'fabric':3209,3250,3280 'fail':1219 'femal':1403,1738 'figur':20,72,263,756,821,963,1625 'figure_style.mplstyle':1638 'file':87,100,114,185,318,763,786,931,1355 'fill':3214 'final':1570 'fine':2481,2511,2551 'fine-gray':2480,2510,2550 'first':352,2360,2395,2729,3129 'fit':2276,2813 'fix':1243 'fleiss':1908 'flex':1558 'flextabl':1560 'follow':73,704 'font':1642 'footnot':221,1422,1441,1462,1497,1592,1624 'forest':504,521,576,2003,2107,2766 'format':215,325,817,837,1016,1235,1349,1471,1484,1626,1671,1696,3128 'fpr':2095 'framework':2929 'freedom':2673 'frequenc':2195 'frequent':2574 'friedman':2662 'full':2990 'function':2493,3315 'funnel':505,2009,2118,2124,2127 'gap':3215 'gee':3113 'geepack':636 'geisser':3172 'general':1443,1502,1594 'generat':10,57,283,665,695,940,1002,1298,1351,1542,2718,2785,2806,2847,2943,3086,3141,3304 'gray':2482,2504,2512,2552 'greenhous':3171 'greenhouse-geiss':3170 'ground':979 'group':35,544,548,1740,2211,2243,2508,2618,2622,2633,2645,2657,3131,3146 'group/analysis':1182 'gtsummari':1368,1536,1545,1552,1779 'guess':3331 'guid':195,299,302,658,1710,2713,2780,2842,2938,3022,3081 'guidanc':686 'guidelin':1702 'guides/missing_data.md':3178 'guides/nhis_icd10_mapping.md':3025 'guides/propensity_score.md':2845 'guides/regression.md':2716,2783 'guides/repeated_measures.md':3084 'guides/survey_weighted.md':2941 'gwqs':617 'hakn':1981 'hallucin':3248 'handl':435,1215,3093 'hazard':2247,2254,2514 'header':716,1390,1407,1581 'health':94,2302,2413 'heatmap':2710 'heterogen':1994 'hk':1975,2168 'hoc':2654,2666 'hochberg':906 'homogen':425,874 'homoscedast':2826 'horizont':1385 'hosmer':2748 'hosmer-lemeshow':2747 'hr':2249,2522,2546,2602,2605 'i-squar':1995 'ic':2329,2364,2373,2445 'icc':1915 'icc/kappa':492 'icd':3046 'icenreg':2327,2372 'identifi':151,363,412 'idi':1877 'imag':78,370 'import':734,738,765 'improv':1880 'imput':2386 'inappropri':2130 'inch':1654,1659 'incid':2271,2467,2492 'includ':1277,1664,1684,1810,1833 'increment':2775 'independ':426,2621,2644 'index':1827,3058,3071 'individu':2005,3144 'inequ':1097 'infer':338 'inflat':1871 'inform':95 'input':796 'install.packages':1267 'insuffici':1293 'integr':1878 'inter':25,480,1894 'inter-rat':24,479,1893 'interact':3132 'interest':2462 'interfac':2485 'intern':2199 'interpret':1929,2098,2527,3140,3229 'interv':1111,2292,2322,2331,2345,2355,2418,2426,3291 'interval-censor':2291,2321,2344,2425 'interval2':2336 'intervent':996 'interview':2967 'invent':3284 'invers':1971,2164 'iptw':2922 'iptw/siptw':2868 'iqr':1023,1453,1719,2194 'irr':490 'issu':2919 'ital':1475 'item':487,2198,2206 'item-tot':2205 'iter':1885,1946 'jama':233,1496,1548 'jama/nejm/lancet':1482 'journal':74,212,226,231,1304,1316,1321,1340,1381,1455,1518,1546,1547,1630,1783 'journal-profil':225 'journal-specif':211,1454 'k':2019,2137,2171 'kaplan':2229 'kaplan-mei':2228 'kappa':1904,1909 'kchs':613 'key':730,2075,3135 'km':540,2275,2314,2350,2438,2464,2499,2592 'knhane':611 'knhanes/nhanes/kchs':2948 'known':1323 'koch':1932 'kolmogorov':866 'kolmogorov-smirnov':865 'krippendorff':488,1911 'kruskal':2217,2649 'kruskal-w':2216,2648 'label':1666,1930 'lancet':235,1489,1549 'landi':1931 'languag':3184,3196 'last':2357,2393 'lead':1473 'leav':2024 'leave-one-out':2023 'legend':1816 'lemeshow':2749 'lesion':369 'letter':1464 'level':1397,1578,1730 'leven':877 'leverag':2820 'lifelin':538 'like':1230 'line':1227,1384,1813,2701 'linear':578,645,2765,2778,2792 'list':405 'literatur':2443 'lme4':634 'lmm':3092,3151 'lmm/gee/rm':639 'load':296,655,673,681,687,759,1302,1311,1325,1459,2714,2781,2843,2939,3023,3082,3176 'locat':275,2819 'log':2239,2369 'log-logist':2368 'log-rank':2238 'logist':564,643,2370,2711,2725,2855 'logit':2091,2094,2866 'long':3127 'longitudin':627 'look':3041 'look-back':3040 'love':601,2884 'lr':2082 'mada':518,2041,2053,2183 'male':1399,1402,1732,1736 'mandatori':2886 'mani':1188 'manifest':923,930,982 'mann':2213,2628 'mann-whitney':2212,2627 'manuscript':1004,1683 'manuscript-readi':1003 'map':3262 'markdown':937,1362 'markdown/console':818 'marker':1463,1505,1524 'match':1766,2861,3192 'matchit':596 'matplotlib':761 'matplotlib.pyplot':766 'matrix':563,2709 'mauch':3164 'may':2175 'md':1331 'mean':1019,1449,1509,1714,1755,3147 'meaning':1600 'means/sds':1207 'measur':294,626,654,1213,1446,1942,2410,2659,3080 'median':1022,1452,1718,2193,2259 'medic':7,48,54,77,3039,3197 'meier':2230 'memori':3307 'met':3112 'meta':29,252,495,502,509,516,1950,1958,2035,2042,2048 'meta-analysi':28,251,494,508,1949,1957,2034,2047 'meta/metafor':1954 'metabin':1961,2146 'metafor':503,517,2043,2186 'metagen':1966 'metainf':2027 'metaprop':1988,2152 'method':920,1057,1065,1070,1168,1970,2163,2324,2405,2434,2476,2860,3091,3169 'method.ci':1992 'method.random.ci':1974,1982,2167 'method.tau':1972,2165 'methodolog':203,306 'metric':959,1289 'mice':3181 'mid':2384 'mid-point':2383 'midpoint':2391 'might':91 'mismatch':1236 'miss':345,436,1184,1232,3094,3104,3174 'mistak':223 'mle':2342 'mm':723,943 'model':254,976,1275,1819,1842,1847,1850,1852,1917,2051,2174,2365,2774,2982,2984,2988 'modifi':1254 'mortal':2559 'multi':629 'multi-timepoint':628 'multicollinear':2827 'multipl':483,891,1160,2562,2706 'multivari':2731,2741 'must':711,3297 'n':862,868,1179,1724,1733,3035 'n-claim':3034 'n/n':1025 'name':163,336,1239,1436,1591,3252,3255,3268 'narrat':2179 'nation':3002 'natur':2428 'necessari':64 'need':432 'negat':2358,2394 'nejm':234,1550 'nejm/lancet':1468 'never':158,1432,3007,3249,3279,3303 'nhane':612 'nhis':676,3017 'nhis_icd10_mapping.md':682 'nlme':635 'non':885,1145,2340,2570,3121 'non-cv':2569 'non-norm':3120 'non-parametr':884,1144,2339 'normal':424,857,1717,2684,2823,3122 'note':428,1444,1503,1512,1522,1531,1595,1867,2017,2134 'np':737 'np.random.seed':742,750 'npmle/turnbull':2332 'npv':1797 'nri':1859,1866 'nri/idi':1843,2771 'ns':1433,1616 'number':165,1015,1055,1686,2234,3296 'number-at-risk':2233 'numpi':735 'nutrit':2971 'observ':591,2362 'odd':1134,2994 'on-demand':200 'one':1226,1396,1577,1729,1919,2025 'one-way':1918 'optim':1829 'or':2770 'or/rr':1965,2150 'order':1491,1499,1516 'ordin':342,524,2219 'os.environ.get':772 'os.path.exists':778 'os.path.join':771 'outcom':537,567,581,1964,2460,2576,2890,3123 'outlier':434 'output':169,458,785,789,804,833,922,935,939,993,1294,1348,1670,2076,2737,2794,3187,3265,3302 'overestim':2465 'overlap':2873,2912 'p':915,1031,1088,1094,1101,1126,1198,1429,1469,1618,1762,1769,2675,2695,2800,3286 'p-valu':914,1087,1125,1197,2674,2694,3285 'packag':454,456,731,732,1233,1263,1955,2044,2326,2478,2974,3316 'pair':520,1941,2109,2632,2634,2656 'palett':1651 'panda':464,739 'panel':2808 'paper':9,56 'par':2374 'paragraph':1009 'paramet':1457,2377 'parametr':851,886,1142,1146,2287,2341,2363 'parametric/semi-parametric':2328 'past':842,1676 'path':770,780,783,1564 'patient':367 'pattern':3029 'pd':741 'pdf':825,1627 'pearson':2680 'per':230,243,347,974,1426,1517,1526,1587,1598,1602,1606,1777,2197 'per-cel':1525 'per-subject':973 'percentag':351 'perform':410,477,958,1170 'period':1485,2265,2311,3043 'phase':310,374,692,997 'phi':96,155,161 'phone':164 'pingouin':489,527,550,560,632 'pipelin':262,1537,1787 'place':1196,1414,1586 'placement':1498 'plan':377,389,441 'plogit':1991,2155 'plot':506,522,577,588,602,638,873,1283,1839,1938,2004,2010,2108,2119,2125,2128,2589,2698,2767,2810,2885,3143,3149 'plt':768 'plt.style.use':781 'plus':870 'png':828,1631 'point':2385,3109 'pool':497,511,1986,2007,2058,2077,2100,2160,3008 'popul':3116 'population-averag':3115 'posit':2361,2396 'positive/negative':2081 'post':2653,2665 'post-hoc':2652,2664 'ppv':1796 'precis':1210 'preclud':2458 'predict':977,1274,1841,2073 'predictions.csv':972 'predictor':568,582,1614,2764 'prefer':61,700,1760,1952,2039,3195 'preferenti':108 'present':439,1241,2587 'preview':355 'primari':413,457,1117,2145,2404,2448,2832 'print':815,834 'prior':2442,3069 'privaci':81 'probabl':1530 'proc':474 'proceed':156 'produc':66,2068 'profil':227,229,1305,1347,1461 'prognosis/prediction':2555 'project':269 'propens':38,291,589,647,2840 'proport':1024,1203,1804,1987,2161,2246,2253 'propos':386 'protect':93 'ps':1765,2853,2867 'ps-match':1764 'psych':491,529 'pt':1646 'public':16,68,1300,1372,2015,2115,2980 'publication-qu':1371 'publication-readi':15,67 'python':60,453,699,717,728,764,2978 'python/r':12 'q':1998,2815,2816 'q-q':2814 'qq':872 'qualiti':1373 'quan':3060 'quantil':2273 'question':385,2609,3226 'r':62,455,586,702,1262,1367,1540,1543,1786,1953,2040,2325,2477,2681,2801,2803,2972 'r/python':257 'rad':237 'radiolog':232,1346,1479,1493 'random':725,747,3153 'random/mixed':1924 'rang':3049 'rank':2240,2642 'rate':485,525,2279 'rater':26,371,481,484,1895,1900,1906 'rather':3329 'ratio':1135,1137,2995 'raw':112,160 'rcts':1768 'reach':2283 'read':84,175,279,315 'readi':17,69,1005 'recent':3067 'recod':433 'recommend':261,1538,2055,2911,2976 'refer':184,204,1609,1812,3305 'referenc':1053 'references/style/figure_style.mplstyle':776 'references/table-standards/table-types/table1_demographics.md':1711 'references/templates/agreement_analysis.py':1898 'references/templates/diagnostic_accuracy.py':1791 'references/templates/dta_meta_analysis.r':2038 'references/templates/propensity_score.py':2850 'references/templates/regression.py':2721,2788 'references/templates/repeated_measures.py':3089 'references/templates/survey_weighted_analysis.py':2946 'references/templates/table1_demographics.py':1707 'regardless':1379 'region':2074 'regress':37,250,290,565,579,644,646,2330,2700,2712,2723,2779,2790,2856 'reitsma':2052,2054 'relev':280,1334 'reliabl':531 'render':1363 'repeat':293,625,653,1409,2419,2658,3079 'replac':1889,2497,3237 'report':308,327,856,889,909,999,1073,1090,1099,1113,1122,1154,1165,1176,1186,1222,1695,1753,1793,1855,1872,1928,2248,2258,2281,2375,2422,2435,2520,2542,2586,2597,2668,2690,2828,2930,2992,3138,3152,3163 'reproduc':11,58,715 'request':1759 'requir':2736,2793,3052 'res':2030 'research':8,49,55,79,384,2608,3225 'residu':2257,2811,2825 'result':552,624,641,845,1008,1028,1158,1679,3136,3234,3282 'retri':1246 'reusabl':191 'review':1366,1635,3239 'rho':2687 'risk':1136,1863,2236,2452,2475,2595 'rm':3099,3161 'rma.mv':2187 'robust':2893 'roc':475,966,1808 'roc_curve.pdf':964 'roc_curve.png':965 'row':332,354 'rrn':166 'rule':218,220,706,745,1074,1078,1377,1386,3037 'run':182,697,850,894,1568,2726 'safe':1650 'sampl':1174,2932,3293 'save':787,808,822,928,1561 'say':3326 'scale':526,2818 'scale-loc':2817 'scatter':561,2697 'schoenfeld':2256 'scipi':465,473,528,549,559 'score':39,292,590,648,1281,1802,1837,1854,2841 'screen':2303,2414,2417 'script':193,703,707,710,1218,1249 'sd':1020,1450,1510,1715,2865 'se':2092,2894 'se/sp':2060,2078,2101 'secondari':415,2151 'section':846,1071,1680 'see':271 'seed':726,748,1947 'select':685,2734 'self':1424 'self-contain':1423 'sensit':1794,2021,2065,2110,2399,2450,2897,3073 'sensitivity/specificity/auc':471 'sentenc':1012,1061 'separ':1477,2057,3006 'sequenti':2981 'serial':2409 'set':2722,2789 'set.seed':753 'sex':2987 'shape':331 'shape/scale':2376 'shapiro':859 'shapiro-wilk':858 'show':1394,1575,1727 'shr':2523 'side':2112,2114 'sign':2641 'signed-rank':2640 'signific':1435,1532,2097,3231 'similar':2950 'simpl':2387 'simul':3211 'singl':1655,1984,2099,2143,2158 'single-arm':1983,2142,2157 'single/average':1926 'siptw':2920 'size':499,554,1034,1121,1175,1597,1652,2678,2838,2933,3289,3294 'skew':1721 'skill':43,188,197,208,266,661,689,774,985,1313,1327,3203 'skill-analyze-stats' 'sklearn':472,570,594 'slope/intercept':1286 'sm':1990,2154 'small':2169 'smd':1757,2879 'smirnov':867 'snippet':1058 'source-aperivue' 'spaghetti':637,3142 'spearman':2088,2686 'specif':213,403,406,1014,1456,1521,1701,1795,2067,2111,2489,2535,2545,2601 'specifi':803,951,1341,1916,3045 'spheric':3097,3111 'squar':1133,1749,1997,2002 'sroc':519,2069,2084,2105 'stabil':2870,2921 'stack':2223 'standard':75,206,1754,2123,2126,2313,2437,2463,2537,2834 'start':712 'stat':3 'state':418,917,1178,1448,1611,2423,2612,2906 'statist':4,41,51,575,1029,1064,1072,1438,1589,2670,2744,3233,3281 'statsmodel':569,583,595,614,633 'status':2306 'step':2851,2857,2875,2887,2895 'strata':2958 'strategi':438 'stratif':3013 'stricter/looser':3076 'strong':2975 'structur':382,708,2190,3155,3157 'studi':372,501,515,680,945,1767,2006,2133,2149,2170,2560,3021 'style':264,757,762,769,779,782,1345,1636 'subdistribut':2513,2521,2604 'subgroup':623,2028,2031,3009 'subject':975 'suggest':181,1266 'suitabl':1067 'summari':836,1781 'superscript':1523 'supplement':1887 'support':21 'surv':2334 'survey':33,606,609,615,650,669,2935,2952,2956,2973 'survey-weight':605,649,668,2934 'survey/likert':523,2191 'survey_weighted.md':674 'surviv':31,532,539,2226,2260,2294,2333,2486 'symbol':1467 'synthesi':2180 'system':222 't-test':1741,2623,2635 't25':2266 'tabl':18,70,205,214,240,244,246,398,459,468,478,493,543,572,585,600,619,622,807,953,1296,1301,1307,1335,1427,1541,1555,1559,1572,1703,1708,1772,2237,2739,2796 'table-standards.md':216 'table-typ':239 'table.docx':1565 'table/figure':1049,1054 'table1_demographics.csv':954 'tableon':466,616 'tabular':324 'target':1320,2927 'tau':2001 'tau-squar':2000 'tbl':1556,1780 'templat':186,242,281,1309,1706,1790,1897,2037,2720,2787,2849,2945,3088 'tend':1868 'term':3198 'test':407,551,684,852,861,879,896,1027,1157,1439,1590,1743,1821,1999,2013,2121,2241,2506,2625,2637,2669,2761,3075,3166 'text':1006,1692 'theme':1544,1551,1784 'three':1353 'threshold':1533,1830,2086 'tidi':2484 'tidwel':2760 'tidycmprsk':2483,2518 'time':534,2267,2298,2317,2390,3054,3108,3130 'time-to-ev':533,2316 'timepoint':630 'titl':1483 'tool':258 'tool-comparison.md':256 'top':1388 'topic-agent-skills' 'topic-biostatistics' 'topic-claude-code' 'topic-claude-skills' 'topic-clinical-research' 'topic-diagnostic-accuracy' 'topic-irb-protocol' 'topic-literature-review' 'topic-manuscript' 'topic-medical-ai' 'topic-medical-research' 'topic-meta-analysis' 'total':2207,2584 'trajectori':3145,3148 'treat':2468 'treatment':592 'trial':2928,3245 'truth':980 'tsv':321 'turnbul':2337 'two':1846,1922 'two-way':1921 'type':241,245,289,339,395,449,946,952,1308,1330,1336,1709,1925,2335,2503,2724,2791 'u':2630 'unavail':1265,2184 'uncertain':3264 'uncorrect':911 'underestim':2315 'underpow':2018,2135 'uniqu':356 'unit':366,1404,1579,1601,1668 'univari':2727,2740 'univers':217,1376,1500 'unknown':2300 'unless':1511 'unmeasur':2903 'unnecessari':1776 'unstandard':2830 'unsur':3325 'updat':2029 'use':106,452,813,883,921,1066,1358,1637,1693,1969,2162,2185,2272,2320,2408,2473,2558,2924,2963,3308 'user':121,143,179,330,402,445,802,950,995,1259,1271,1365,3191,3193,3222,3272 'user-specifi':801,949 'usual':1775 'valid':1566 'valu':162,346,357,916,1089,1092,1105,1127,1199,1430,1470,1619,1770,2676,2696,2776,2901,3287 'variabl':558,1393,1445,1574,1713,1723,1726,2032,2707,2735,2966,3014,3251,3257,3261,3267 'varianc':876 'variant':2923 'vector':826,968,1628 'verifi':3266 'version':729,733,819 'vertic':1383 'via':2371 'vif':2751,2804 'violat':882,2757 'visit':2312 'visual':871,2221 'vs':1143,1466,1480,1487,1494,1851,2812,2968,2970 'wait':443,1269 'walli':2218,2650 'warn':119,177,2755 'warranti':2264 'way':1920,1923 'weibul':2286,2366 'weight':603,607,618,651,670,2871,2874,2913,2918,2936,2960,2965,2993 'weighted/matched':2889 'weightit':597 'whether':89 'whitney':2214,2629 'wide':3126 'width':1662 'wilcoxon':2639 'wilk':860 'wilson':1801 'window':3055 'within':1415 'without':994,1083,1253 'wor':621,2996 'word/latex':1374 'work':104 'workflow':309 'would':1688 'wrong':1237 'x':333 'x.xx':1030,1038 'x.xx-x.xx':1041 'xx.x':1026 'yaml':228,1317,1460 'year':1604,1608 'youden':1825 'yyyi':722,942 'yyyy-mm-dd':721,941 'zero':1474 'β':2797,2831,2835 '가':130 '경우':134 '데이터에':123 '등':129 '먼저':137 '비식별화를':138 '스킬로':136 '식별정보':125 '연락처':128 '이':122 '이름':126 '있습니까':132 '주민번호':127 '진행해주세요':139 '포함되어':131 '포함된':133 '환자':124","prices":[{"id":"204bbce1-15aa-4975-b1b8-7f259e5982ea","listingId":"99d34c56-da8c-4126-b296-ff93bc9b6449","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Aperivue","category":"medsci-skills","install_from":"skills.sh"},"createdAt":"2026-05-13T12:57:43.684Z"}],"sources":[{"listingId":"99d34c56-da8c-4126-b296-ff93bc9b6449","source":"github","sourceId":"Aperivue/medsci-skills/analyze-stats","sourceUrl":"https://github.com/Aperivue/medsci-skills/tree/main/skills/analyze-stats","isPrimary":false,"firstSeenAt":"2026-05-13T12:57:43.684Z","lastSeenAt":"2026-05-18T18:56:28.547Z"}],"details":{"listingId":"99d34c56-da8c-4126-b296-ff93bc9b6449","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Aperivue","slug":"analyze-stats","github":{"repo":"Aperivue/medsci-skills","stars":98,"topics":["agent-skills","biostatistics","claude-code","claude-skills","clinical-research","diagnostic-accuracy","irb-protocol","literature-review","manuscript","medical-ai","medical-research","meta-analysis","physician-researcher","prisma","pubmed","radiology","reporting-guidelines","strobe","systematic-review","tripod-ai"],"license":"other","html_url":"https://github.com/Aperivue/medsci-skills","pushed_at":"2026-05-17T20:50:52Z","description":"Claude Code skills for medical research — literature search, reporting guidelines, statistical analysis, publication figures. Built by a physician-researcher, tested on real publications. MIT licensed.","skill_md_sha":"bb1b3d5a6643f1240654465498964f98169025ad","skill_md_path":"skills/analyze-stats/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Aperivue/medsci-skills/tree/main/skills/analyze-stats"},"layout":"multi","source":"github","category":"medsci-skills","frontmatter":{"name":"analyze-stats","description":"Statistical analysis for medical research papers. Generates reproducible Python/R code with publication-ready tables and figures. Supports diagnostic accuracy, inter-rater agreement, meta-analysis, survival analysis, survey data, group comparisons, regression, propensity score, and repeated measures."},"skills_sh_url":"https://skills.sh/Aperivue/medsci-skills/analyze-stats"},"updatedAt":"2026-05-18T18:56:28.547Z"}}