scientific-skills/Evidence Insights/adaptive-trial-simulator/SKILL.md
Design and simulate adaptive clinical trials with interim analyses, sample size re-estimation, and early stopping rules. Evaluate Type I error control, power, and expected sample size via Monte Carlo simulation before trial initiation.
npx skillsauth add aipoch/medical-research-skills adaptive-trial-simulatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Statistical simulation platform for designing and validating adaptive clinical trial designs in silico. Enables optimization of interim analysis strategies, sample size adaptation, and early stopping rules while maintaining Type I error control.
# Run standard group sequential design
python scripts/main.py
# Adaptive design with sample size re-estimation
python scripts/main.py --design adaptive_reestimate
# Optimize design parameters
python scripts/main.py --optimize
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| --design | str | group_sequential | No | Trial design type |
| --n-simulations | int | 10000 | No | Number of Monte Carlo simulations |
| --sample-size | int | 200 | No | Initial sample size per arm |
| --effect-size | float | 0.3 | No | Effect size (Cohen's d) |
| --alpha | float | 0.05 | No | Type I error rate |
| --power | float | 0.80 | No | Target statistical power |
| --interim-looks | int | 1 | No | Number of interim analyses |
| --spending-function | str | obrien_fleming | No | Alpha spending function |
| --reestimate-method | str | promising_zone | No | Sample size re-estimation method |
| --output | str | results.json | No | Output file path |
| --visualize | flag | False | No | Generate visualization charts |
| --optimize | flag | False | No | Search for optimal design parameters |
# Full adaptive design with visualization
python scripts/main.py \
--design adaptive_reestimate \
--n-simulations 50000 \
--sample-size 250 \
--effect-size 0.35 \
--interim-looks 2 \
--spending-function obrien_fleming \
--visualize \
--output adaptive_results.json
| Design Type | Description | Use Case | |-------------|-------------|----------| | Group Sequential | Fixed interim looks with stopping boundaries | Standard adaptive trials | | Adaptive Re-estimate | Sample size adjustment based on interim data | Uncertain effect size | | Drop the Loser | Multi-arm trials dropping inferior arms | Phase II dose selection |
| Function | Characteristics | Early Boundary | |----------|----------------|----------------| | O'Brien-Fleming | Conservative early | High Z-scores early | | Pocock | Aggressive early | Lower Z-scores throughout | | Power Family | Moderate (ρ=3) | Balanced approach |
{
"design_config": {
"design_type": "adaptive_reestimate",
"sample_size_per_arm": 200,
"effect_size": 0.3,
"alpha": 0.05,
"target_power": 0.8
},
"simulation_results": {
"power": 0.8234,
"type_i_error": 0.0481,
"expected_sample_size": 385.2,
"early_stop_rate": {
"efficacy": 0.1523,
"futility": 0.0841
}
}
}
⚠️ AI自主验收状态: 需人工检查
This skill requires:
pip install -r requirements.txt
numpy>=1.20.0
scipy>=1.7.0
matplotlib>=3.4.0
| Risk Indicator | Assessment | Level | |----------------|------------|-------| | Code Execution | Python scripts with mathematical calculations | Medium | | Network Access | No network access | Low | | File System Access | Writes simulation results | Low | | Instruction Tampering | Statistical parameters could affect results | Medium | | Data Exposure | No sensitive data exposure | Low |
pip install -r requirements.txt
python scripts/main.py --help
Available in references/:
⚠️ DISCLAIMER: This tool provides simulation results for research and planning purposes only. All clinical trial designs should be reviewed by qualified biostatisticians and regulatory experts before implementation.
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.