simtrial-fundamentals

Generate survival data and conduct weighted logrank tests for clinical trial simulations in R.

9|1|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/choxos/BiostatAgent --skill simtrial-fundamentals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simtrial-fundamentals
Source: https://github.com/choxos/BiostatAgent/tree/main/plugins/clinical-trial-simulation/skills/simtrial-fundamentals
Command: npx skills add https://github.com/choxos/BiostatAgent --skill simtrial-fundamentals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Time-to-event clinical trial simulation requires a compact, reliable toolchain to generate realistic survival data and assess statistical methods.

Core Features & Use Cases

  • Time-to-event data generation with piecewise hazards (sim_pw_surv, rpwexp)
  • Survival analyses and advanced tests (wlr, maxcombo, rmst, milestone)
  • Group-sequential and scalable simulations (sim_gs_n) with gsDesign2 integration

Quick Start

Install and load the simtrial package, then run sim_pw_surv to generate sample trial data and evaluate analysis methods.

Frequently Asked Questions about simtrial-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate time-to-event clinical trial data with piecewise hazards in R?

To simulate time-to-event clinical trial data in R, use vectorized functions like sim_pw_surv and rpwexp to generate survival datasets with piecewise hazard modeling, enrollment rates, and failure rates.

What is the best way to run weighted logrank tests for survival analysis?

Running weighted logrank tests for survival analysis is best handled by the wlr function, which evaluates time-to-event trial data and supports advanced testing methods like maxcombo, rmst, and milestone analyses.

Can I use group-sequential designs for clinical trial simulation?

Yes, you can use group-sequential designs for clinical trial simulation by applying the sim_gs_n function, which integrates with gsDesign2 to enable scalable and modular trial design evaluations.

Does simtrial integrate with gsDesign2 for group-sequential design evaluation?

Yes, simtrial integrates directly with gsDesign2 to support group-sequential design evaluation, allowing you to run sim_gs_n for scalable time-to-event trial simulations and boundary assessments.

What statistical tests are available for time-to-event survival analysis?

Available statistical tests for time-to-event survival analysis include weighted logrank (wlr), maxcombo, rmst, and milestone tests, providing diverse methods to assess simulated clinical trial data.