.claude/skills/gsDesign2/SKILL.md
Guide users through next-generation group sequential design using the gsDesign2 R package. Use this skill when the user asks about: gs_design_ahr, gs_power_ahr, gs_update_ahr, sequential_pval, average hazard ratio designs, non-proportional hazards, piecewise enrollment/failure rates, spending time, or information fraction computation.
npx skillsauth add keaven/gsDesignSkills gsDesign2Install 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 gsDesign2 >= 1.1.8 (main branch at github.com/Merck/gsDesign2).
The llms.txt from gsDesign.ai may lag behind; local API docs are in llms_local.txt.
references/llms.txt (source: https://gsDesign.ai)references/llms_local.txtreferences/code_patterns.mdgs_design_ahr() - AHR-based group sequential design (primary workhorse)gs_design_wlr() - Weighted logrank designgs_design_rd() - Rate difference design (now with minimum risk weighting)gs_design_combo() - Combination test designgs_design_npe() - Non-proportional effect design (general)fixed_design() - Fixed (non-sequential) designsgs_power_ahr() - Power for AHR designsgs_power_wlr() - Power for weighted logrank designsgs_power_rd() - Power for rate difference designsgs_power_combo() - Power for combination testsgs_power_npe() - Power for general NPE designsgs_info_ahr() / gs_info_wlr() / gs_info_rd() / gs_info_combo() - Statistical informationgs_spending_bound() - Spending function boundsgs_spending_combo() - Spending bounds for combination testsgs_b() - Fixed boundary valuesgs_bound_summary() - Formatted bound summary (supports multiple alpha levels)gs_update_ahr() - Update bounds with observed data (supports stratified piecewise events)gs_cp_npe() - Conditional power under NPHsequential_pval() - Sequential p-value for AHR designs (new in 1.1.9)define_enroll_rate() - Piecewise enrollment rates (supports strata)define_fail_rate() - Piecewise failure rates with HR (supports strata)ahr() / ahr_blinded() - Average hazard ratio computationexpected_accrual() / expected_event() / expected_time() - Expected quantitiespw_info() - Piecewise informationto_integer() - Integer sample size roundingppwe() / s2pwe() - Piecewise exponential utilitieswlr_weight() - Weight functions for weighted logrankas_gt() / as_rtf() - Table output (footnotes can be suppressed)summary() / text_summary() - Text summariesgs_bound_summary() - Bound summary tableFor detailed code templates, read references/code_patterns.md.
Topics covered:
gs_design_ahr()gs_power_ahr() (event = NULL caveat)to_integer()sequential_pval() for multiplicitygs_update_ahr() (stratified piecewise events)gs_cp_npe()info_scale options (h0_info, h1_info, h0_h1_info)info_frac = NULL: Use with analysis_time to let timing drive the design; gsDesign2 derives the information fractionevent = NULL in gs_power_ahr: Always set this when using analysis_time; the default c(30, 40, 50) causes length mismatchesinfo_scale = "h0_info": Matches gsDesign convention; recommended for multiplicity workflowstiming in upar/lpar to decouple spending from information fraction (critical for delayed effects and multiple hypotheses)stratum column in define_enroll_rate() and define_fail_rate(); scale complement enrollment from subgroup using prevalencesequential_pval() (v1.1.9+): Works directly with gs_design_ahr() output; replaces the need to call gsDesign::sequentialPValue() with manual conversiongs_update_ahr() event_tbl: Supports piecewise event tables for delayed-effect designs where events per interval are trackedbinding = FALSE so efficacy bounds are computed ignoring the futility boundsf = "sfLDOF" works in addition to sf = sfLDOFtesting
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 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.
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.