simtrial1.0.2 package

Clinical Trial Simulation

as_gt

Convert summary table to a gt object

check_args

Check argument types, length, or dimension

counting_process

Process survival data into counting process format

create_cut

Create a cutting function

create_test

Create a cutting test function

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

early_zero

Zero early weighting function

fh

Fleming-Harrington weighting function

fit_pwexp

Piecewise exponential survival estimation

get_analysis_date

Derive analysis date for interim/final analysis given multiple conditi...

get_cut_date_by_event

Get date at which an event count is reached

maxcombo

MaxCombo test

mb

Magirr and Burman weighting function

milestone

Milestone test for two survival curves

multitest

Perform multiple tests on trial data cutting

randomize_by_fixed_block

Permuted fixed block randomization

rmst_single_arm

Calculate RMST for a single cut-off time point

rmst_two_arm

Calculate RMST difference

rmst

RMST difference of 2 arms

rpwexp_enroll

Generate piecewise exponential enrollment

rpwexp

The piecewise exponential distribution

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

sim_pw_surv

Simulate a stratified time-to-event outcome randomized trial

simtrial-package

simtrial: Clinical Trial Simulation

summary

Summary of group sequential simulations.

to_sim_pw_surv

Convert enrollment and failure rates from sim_fixed_n() to `sim_pw_s...

wlr

Weighted logrank test

Provides some basic routines for simulating a clinical trial. The primary intent is to provide some tools to generate trial simulations for trials with time to event outcomes. Piecewise exponential failure rates and piecewise constant enrollment rates are the underlying mechanism used to simulate a broad range of scenarios such as those presented in Lin et al. (2020) <doi:10.1080/19466315.2019.1697738>. However, the basic generation of data is done using pipes to allow maximum flexibility for users to meet different needs.

  • Maintainer: Yujie Zhao
  • License: GPL-3
  • Last published: 2025-11-20