.claude/skills/wpgsd/SKILL.md
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.
npx skillsauth add keaven/gsDesignSkills wpgsdInstall 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 wpgsd from github.com/Merck/wpgsd.
references/llms.txt (source: local Rd man pages)references/code_patterns.mdgenerate_bounds() - Compute group sequential bounds accounting for correlations across hypothesesclosed_test() - Closed testing procedure using weighted parametric testscalc_seq_p() - Calculate sequential p-valuesgenerate_corr() - Generate correlation matrix from event counts (for nested populations)generate_event_table() - Build event count table for correlation computationfind_astar() - Find adjusted alpha for spending functionfind_xi() - Find xi parameter for boundsFor detailed code templates, read references/code_patterns.md.
Topics covered:
calc_seq_p() (WPGSD and Bonferroni)generate_bounds() type parameter: 0 = Bonferroni (baseline), 1 = fixed spending, 2 = overall spending (single SF), 3 = separate spending (per-hypothesis SFs with inflation factor xi)sf/sfparm/t are lists (one per hypothesis); for type 2, they are scalars (single overall SF)(i, i) = events for hypothesis i alone; (i, j) = events in the intersection of populations i and jn_{1∧3} = n_1 (all H1 events are also H3 events)n_{1∧2} = control arm events onlyclosed_test() is needed (not just shortcut testing)generate_corr() bug for k > 2: Incorrectly computes within-hypothesis cross-analysis entries for non-adjacent analyses. For k > 2, build the event-count matrix D manually and compute corr = diag(1/sqrt(diag(D))) %*% D %*% diag(1/sqrt(diag(D))). See code_patterns.md section on manual correlation.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.
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.