.claude/skills/rpact/SKILL.md
Guide users through confirmatory adaptive clinical trial design and analysis using the rpact R package. Use this skill when the user asks about: adaptive designs, sample size reassessment, conditional power, inverse normal combination test, Fisher combination test, multi-stage designs, or rpact design objects.
npx skillsauth add keaven/gsDesignSkills rpactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Note: This skill targets rpact >= 4.x (CRAN).
references/llms.txt (source: https://docs.rpact.org/reference/)references/code_patterns.mdgetDesignGroupSequential() - Group sequential design (O'Brien-Fleming, Pocock, alpha-spending, etc.)getDesignInverseNormal() - Inverse normal combination test for adaptive designsgetDesignFisher() - Fisher combination test for adaptive designsgetDesignConditionalDunnett() - Conditional Dunnett test for multi-armgetDesignCharacteristics() - Design characteristics and propertiesgetDesignSet() - Compare multiple designsgetSampleSizeMeans() - Continuous endpointsgetSampleSizeRates() - Binary endpointsgetSampleSizeSurvival() - Time-to-event endpointsgetSampleSizeCounts() - Count data endpointsgetPowerMeans() - Continuous endpointsgetPowerRates() - Binary endpointsgetPowerSurvival() - Time-to-event endpointsgetPowerCounts() - Count data endpointsgetPowerAndAverageSampleNumber() - Power and ASNgetSimulationMeans() / getSimulationRates() / getSimulationSurvival() / getSimulationCounts() - Two-armgetSimulationMultiArmMeans() / getSimulationMultiArmRates() / getSimulationMultiArmSurvival() - Multi-armgetSimulationEnrichmentMeans() / getSimulationEnrichmentRates() / getSimulationEnrichmentSurvival() - EnrichmentgetDataset() - Enter stage-wise observed datagetStageResults() - Compute stage-wise test statisticsgetAnalysisResults() - Final adaptive analysis resultsgetClosedCombinationTestResults() - Closed testing for multi-armgetClosedConditionalDunnettTestResults() - Dunnett closed testinggetConditionalPower() - Conditional power at interimgetConditionalRejectionProbabilities() - CRP for adaptive recalculationgetFinalPValue() - Adjusted final p-valuegetFinalConfidenceInterval() - Adjusted confidence intervalgetRepeatedPValues() - Repeated p-values across stagesgetRepeatedConfidenceIntervals() - Repeated CIs across stagesgetAccrualTime() - Define accrual periodgetPiecewiseSurvivalTime() - Piecewise exponential survivalgetEventProbabilities() - Event probability computationgetNumberOfSubjects() - Expected accrual over timegetObservedInformationRates() - Observed information ratesgetTestActions() - Decision at each stagegetPerformanceScore() - Design performance evaluationplot() methods for all design, power, simulation, and analysis objectsgetAvailablePlotTypes() - List available plot types for an objectreadDataset() / readDatasets() - Read data from CSVwriteDataset() / writeDatasets() - Write data to CSVgetObjectRCode() - Generate reproducible R code for any rpact objectFor detailed code templates, read references/code_patterns.md.
Topics covered:
getDataset() (survival, means, rates)getStageResults(), getAnalysisResults(), getTestActions())getDesignSet()getObjectRCode()typeOfDesign choices: "OF" (O'Brien-Fleming), "P" (Pocock), "asOF"/"asHSD"/"asKD" (alpha-spending variants). Alpha-spending versions ("as*") allow unequal information rate spacinggetDesignInverseNormal() vs getDesignGroupSequential(): Same signature, but inverse normal is for adaptive designs where sample size can be recalculated between stagesbindingFutility = FALSE: Non-binding futility is standard for confirmatory trials; efficacy bounds computed ignoring futilityhazardRatio, median1/median2, lambda1/lambda2, or pi1/pi2 (event probabilities) — use only oneplannedEvents in simulation: Vector of cumulative event counts at each analysis (not information fractions)intersectionTest: "Dunnett" (parametric, most powerful), "Simes" (non-parametric), "Bonferroni" (conservative)typeOfSelection: Controls arm selection at interim — "best" (highest effect), "rBest" (r best arms), "epsilon" (within epsilon of best), "all" (no dropping)getObjectRCode(): Use to generate reproducible R code for any rpact object — invaluable for reporting and validationalpha = 0.05, beta = 0.2, kMax = NA (inferred), sided = 1 — always set explicitly for clinical trial designstesting
Guide users through weighted parametric group sequential design using the wpgsd R package. Use this skill when the user asks about: correlated test statistics across hypotheses, generate_bounds, closed_test, correlation matrices for nested populations, or parametric multiplicity adjustment with group sequential designs.
tools
Guide users through clinical trial simulation using the simtrial R package. Use this skill when the user asks about: simulating survival trials, simfix, sim_pw_surv, cutting data at calendar or event times, weighted logrank tests, MaxCombo tests, or simulation-based power.
tools
Guide users through multi-endpoint group sequential trial simulation with multiplicity-controlled testing. Use this skill when the user asks about: simulating trials with OS, PFS, and ORR endpoints, illness-death model simulation with gsDesign bounds, sequential p-values in simulation loops, combining graphicalMCP with gsDesign for simulation-based operating characteristics, cumulative rejection probabilities, or building a full pipeline from design through simulation to multiplicity-adjusted testing.
tools
Guide users through simulating clinical trials using the illness-death model with response. Use this skill when the user asks about: multi-state models for oncology trials, simulating correlated OS/PFS/ORR endpoints, transition rates between disease states, illness-death model calibration, building ADTTE datasets from simulation, analysis cut date determination, or theoretical survival curves from transition rates.