academic-aio
Use when a medical AI paper should be found and cited by AI search engines and RAG tools. Optimizes the title, abstract, summary…
Use when planning how many patients or cases a study needs before data collection (power analysis, IRB justification). Walks a decision tree to the right test and returns reproducible R/Python code and IRB-ready justification text. Analyzing collected data is /analyze-stats.
$ npx -y skills add Aperivue/medsci-skills --skill calc-sample-size --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/calc-sample-sizeContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when planning how many patients or cases a study needs before data collection (power analysis, IRB justification). Walks a decision tree to the right test and returns reproducible R/Python code and IRB-ready justification text. Analyzing collected data is /analyze-stats.
name: calc-sample-size description: Use when planning how many patients or cases a study needs before data collection (power analysis, IRB justification). Walks a decision tree to the right test and returns reproducible R/Python code and IRB-ready justification text. Analyzing collected data is /analyze-stats. metadata: triggers: "sample size, power analysis, power calculation, how many patients, how many subjects, IRB sample size"
Walk the user through this tree one question at a time; do not assume answers. Reader studies, segmentation and model-comparison designs sit outside the tree: see Tests 14–17.
What is your primary outcome?
|
+-- Binary (yes/no, positive/negative)
| |
| +-- Paired data (same subjects, two methods)?
| | +-- YES --> [5] McNemar test
| | +-- NO --> How many groups?
| | +-- 2 groups, superiority --> [4] Two-proportion comparison (chi-square)
| | +-- 2 groups, non-inferiority --> [10] Non-inferiority / equivalence
| | +-- Multivariable model --> single-predictor hypothesis test? --> [9] Logistic regression
| | --> clinical prediction / AI model for use?
| | +-- developing the model --> [12] Prediction-model development (Riley)
| | +-- externally validating --> [13] External-validation (Riley)
| |
+-- Continuous (measurement, score)
| |
| +-- How many groups?
| +-- 2 groups --> [6] Independent t-test
| +-- 3+ groups --> [8] One-way ANOVA
|
+-- Time-to-event (survival, recurrence)
| |
| +-- Two groups, unadjusted --> [7] Log-rank test
| +-- Multivariable / adjusted HR --> [7] Log-rank (Schoenfeld) + [11] Cox EPV
|
+-- Agreement (inter-rater, reproducibility)
| |
| +-- Continuous measurements --> [2] ICC
| +-- Categorical ratings --> [3] Kappa
|
+-- Diagnostic accuracy (Se, Sp, AUC precision)
|
+--> [1] Diagnostic accuracy (precision-based)Once the test is chosen, read `${CLAUDE_SKILL_DIR}/references/formulas.md` § Test N — the parameter table with defaults, the effect-size interpretation, the formula, R/Python code and the methodological reference.
| # | Test | Use when | |---|------|----------| | 1 | Diagnostic accuracy — Se/Sp precision | desired 95% CI half-width for sensitivity or specificity | | 2 | ICC agreement (Walter 1998 test; Bonett 2002 CI width) | inter-/intra-rater agreement on continuous measurements (tumor size, angle) | | 3 | Kappa agreement (Donner & Eliasziw 1992; needs the trait prevalence) | agreement on categorical ratings (BI-RADS category, lesion present/absent) | | 4 | Two-proportion comparison (chi-square) | two independent groups (AI vs conventional detection rate) | | 5 | McNemar (paired proportions) | paired binary outcomes (two readers on the same cases, before/after) | | 6 | Independent t-test | means in two independent groups (lesion size, malignant vs benign) | | 7 | Survival / log-rank (Schoenfeld events, then patients) | time-to-event between two groups | | 8 | One-way ANOVA | means across 3+ independent groups | | 9 | Logistic regression (Peduzzi EPV + Hsieh 1998, continuous or binary predictor) | multivariable binary outcome, single-predictor hypothesis test | | 10 | Non-inferiority / equivalence | new method not worse than standard by more than a pre-specified margin, or equivalent within it | | 11 | Cox regression EPV | multivariable Cox model — enough events for stable estimates |
a clinical prediction / medical-AI model intended for use, EPV-10 is outdated and reviewer-vulnerable — use Test 12 (development) / Test 13 (validation). Always report both Peduzzi and Hsieh and recommend the larger N.
method. Equivalence is TOST, powered jointly. The margin must be clinically justified (see `formulas.md` § Margin selection).
run Test 7 (Schoenfeld) and recommend the larger N.
Each has its own reference file (parameters, method, reporting); read it once the test is chosen.
classification model (including a medical-AI model evaluated as one) for use. EPV-10 does not apply: N is the largest satisfying all Riley criteria — three for a binary or time-to-event outcome, four for a continuous one (R `pmsampsize`).
CI width of the C-statistic, calibration slope, O:E and (if claimed) net benefit (R `pmvalsampsize`); ≥ 100 events and ≥ 100 non-events is only a floor. For Tests 12–13 read `${CLAUDE_SKILL_DIR}/references/prediction_model_sample_size.md`.
non-inferior to readers. Test 1 under-sizes it because readers are a random effect: size readers `J` × cases from pilot/literature variance components with `RJafroc` / `MRMCaov` / `iMRMC` (do not hand-roll the OR algebra) and report the `J × N` power grid. Read `${CLAUDE_SKILL_DIR}/references/mrmc_reader_study_sample_size.md`.
not a proportion: `n ≈ (1.96·SD/δ)²` from the pilot SD of per-case Dice, sized on the worst structure; CI by patient-level bootstrap (BCa). This is precision; a comparison is Test 16. Read `${CLAUDE_SKILL_DIR}/references/segmentation_metric_sample_size.md`.
Created & maintained by Yoojin Nam, MD Department of Radiology and Research Institute of Radiology, University of Ulsan College of Medicine, Asan Medical Center, Seoul, Republic of Korea MedSci Skills is a set of Agent Skills for clinical research: literature
Use when a medical AI paper should be found and cited by AI search engines and RAG tools. Optimizes the title, abstract, summary…
Use when a target journal has no profile yet. Reads the journal's author guidelines and writes a detailed /write-paper profile…
Use when data needs statistical analysis. Runs reproducible Python/R code for Table 1, diagnostic accuracy, agreement,…
Use when analyzing a researcher's publication record from PubMed. Fetches an author's papers, classifies study types and author…
Use when one validated cohort analysis must be repeated across many exposure/outcome pairs. Generates one R/Python script per…