adaptive-trial-simulator
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aipoch-ai/adaptive-trial-simulatorAdaptive Trial Simulator
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.
Features
- Design Simulation: Monte Carlo validation of adaptive designs
- Sample Size Re-estimation: Adapt sample size based on interim data
- Early Stopping Rules: Futility and efficacy boundary optimization
- Type I Error Control: Validate alpha spending strategies
- Multi-Arm Designs: Drop-the-loser and seamless Phase II/III
- Power Optimization: Identify designs with maximum power efficiency
Usage
Basic Usage
# 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
Parameters
| 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 |
Advanced Usage
# 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 Types
| 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 |
Spending Functions
| 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 |
Output Example
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aipoch-ai-adaptive-trial-simulator": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
skill-tracker
通用技能使用统计追踪器,支持 Python 和 Node.js 技能,自动记录调用次数、成功率,生成使用排行榜。数据本地存储,保护隐私。
mathgraphs
Math & statistics graphing, computation, visualization and validation engine
clinicaltrials-gov-parser
Monitor and summarize competitor clinical trial status changes from ClinicalTrials.gov. Trigger: When user asks to track clinical trials, monitor trial status changes, get updates on specific trials, or analyze competitor trial activities. Use cases: Pharma competitive intelligence, trial monitoring, status tracking, recruitment updates, completion alerts.
soulmate
AI恋爱模拟器 - 让你的 Agent 成为懂你的灵魂伴侣 💕
inclusion-criteria-gen
Generate and optimize clinical trial subject inclusion/exclusion criteria to balance scientific rigor with recruitment feasibility. Trigger when users need to design eligibility criteria for new trials, optimize existing criteria for better enrollment, analyze competitor trial eligibility patterns, or assess recruitment barriers. Use cases: Protocol design, eligibility optimization, recruitment strategy, competitive eligibility analysis, feasibility assessment.