Skip to contents

Distributions

rpwexp()
The piecewise exponential distribution
rpwexp_enroll()
Generate piecewise exponential enrollment
fit_pwexp()
Piecewise exponential survival estimation

Simulate data under the piecewise model

sim_pw_surv()
Simulate a stratified time-to-event outcome randomized trial
sim_fixed_n()
Simulation of fixed sample size design for time-to-event endpoint
sim_gs_n()
Simulate group sequential designs with fixed sample size
to_sim_pw_surv()
Convert enrollment and failure rates from sim_fixed_n() to sim_pw_surv() format

Cut data

cut_data_by_date()
Cut a dataset for analysis at a specified date
cut_data_by_event()
Cut a dataset for analysis at a specified event count
get_cut_date_by_event()
Get date at which an event count is reached
get_analysis_date()
Derive analysis date for interim/final analysis given multiple conditions
create_cut()
Create a cutting function

Compute p-values/test statistics

counting_process()
Process survival data into counting process format
rmst()
RMST difference of 2 arms
milestone()
Milestone test for two survival curves
wlr()
Weighted logrank test
maxcombo()
MaxCombo test
create_test()
Create a cutting test function
multitest()
Perform multiple tests on trial data cutting

Summarize simulations

summary(<simtrial_gs_wlr>)
Summary of group sequential simulations.
as_gt()
Convert summary table to a gt object

Randomization algorithms

randomize_by_fixed_block()
Permuted fixed block randomization

Weight functions for WLR test

mb()
Magirr and Burman weighting function
fh()
Fleming-Harrington weighting function
early_zero()
Zero early weighting function

Example datasets

ex1_delayed_effect
Time-to-event data example 1 for non-proportional hazards working group
ex2_delayed_effect
Time-to-event data example 2 for non-proportional hazards working group
ex3_cure_with_ph
Time-to-event data example 3 for non-proportional hazards working group
ex4_belly
Time-to-event data example 4 for non-proportional hazards working group
ex5_widening
Time-to-event data example 5 for non-proportional hazards working group
ex6_crossing
Time-to-event data example 6 for non-proportional hazards working group
mb_delayed_effect
Simulated survival dataset with delayed treatment effect