.claude/skills/gsDesignNB/SKILL.md
Guide users through sample size calculation, group sequential design, and simulation for clinical trials with negative binomial (recurrent event) outcomes using the gsDesignNB R package. Use this skill when the user asks about: negative binomial sample size, recurrent event trials, overdispersed counts, event gaps, rate ratios, Wald test for count data, seasonal event rates, blinded or unblinded sample size re-estimation, group sequential designs for negative binomial endpoints, or the Zhu-Lakkis method.
npx skillsauth add keaven/gsDesignSkills gsDesignNBInstall 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.
references/llms.txt (built from local man pages)references/code_patterns.mdsample_size_nbinom() - Sample size/power for negative binomial outcomes (Zhu-Lakkis Method 3)gsNBCalendar() - Group sequential design with calendar-time analysis schedulecompute_info_at_time() - Statistical information at a given calendar timetoInteger() - Round sample sizes to integers preserving allocation ratiocheck_gs_bound() - Check if group sequential bounds are crossedsummarize_gs_sim() - Summarize operating characteristics from simulationsnb_sim() - Simulate recurrent events (Gamma-Poisson mixture)nb_sim_seasonal() - Simulate recurrent events with seasonal variationsim_gs_nbinom() - Simulate multiple group sequential trialscut_data_by_date() - Cut simulated data at a calendar dateget_analysis_date() - Find date when target event count is reachedget_cut_date() - Find earliest date satisfying multiple analysis criteriacut_date_for_completers() - Find date when target completers are reachedcut_completers() - Cut data for completers analysismutze_test() - Wald test for treatment rate ratio (NB or Poisson)estimate_nb_mom() - Method of moments estimation for NB parameterscalculate_blinded_info() - Blinded information and dispersion estimationblinded_ssr() - Blinded SSR using Friede & Schmidli methodunblinded_ssr() - Unblinded SSR using observed group ratesFor detailed code templates, read references/code_patterns.md.
Topics covered:
event_gap time units. This reduces effective exposure: lambda_eff = lambda / (1 + lambda * gap). Specified in the same time units as rates.Q = E[t^2] / E[t]^2 inflates the variance. sample_size_nbinom() handles this automatically.mutze_test() fits a negative binomial GLM with offset for log exposure. Falls back to Poisson when the NB dispersion estimate is very large (> poisson_threshold).gsNBCalendar() takes analysis_times as calendar months. Information at each analysis depends on enrollment pattern, dropout, and follow-up.usTime/lsTime control alpha spending and may differ from the information fraction. This allows calendar-based or event-based spending schedules.calculate_blinded_info() uses the blinded (pooled) rate and dispersion to estimate information. Can produce extreme values when the NB MLE is unstable — bound dispersion or use planning values as a fallback.check_gs_bound() info_scale: Use "blinded" (default) or "unblinded" to select which information drives bound updates at analysis time.testing
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.