Skip to contents

Define a trial

Building blocks of a simulated trial.

trial()
Define a Trial
arm()
Define an Arm
endpoint()
Define Endpoints
regimen()
Define a Regimen
StaggeredRecruiter()
Generate Enrollment Time from Piecewise Constant Uniform Distribution

Milestones and triggering conditions

Register milestones and the conditions that trigger them.

milestone()
Define a Milestone
listener()
Define a Listener
controller()
Define a Controller
calendarTime()
Triggering Condition by Calendar Time
enrollment()
Triggering Condition by Number of Randomized Patients
eventNumber()
Triggering Condition by Number of Events or Non-missing Observations of an Endpoint
doNothing()
An Action Function that Does Nothing

Adaptations

Methods called within action functions to adapt an ongoing trial.

add_arms()
Adding One or More Arms to a Trial
remove_arms()
Removing One or More Arms From a Trial
resize()
Resizing a Trial
update_sample_ratio()
Updating Sampling Ratios of Existing Arms in a Trial
update_generator()
Updating Data Generators of One or More Endpoints in an Arm
crossover()
Crossover at a Milestone
stop_followup()
Stopping Follow-Up of Selected Patients in a Trial
update_accrual_rate()
Updating the Accrual Rate of a Trial at a Milestone
update_milestone()
Updating a Not-Yet-Triggered Milestone of a Trial

Statistical analysis

Model fitting and multiplicity-controlled testing.

fitCoxph()
Fit Cox Proportional Hazard Ratio model
fitLogrank()
Carry out log rank test
fitLinear()
Fit linear regression model
fitLogistic()
Fit logistic regression model
fitFarringtonManning()
Farrington-Manning test for rate difference
GraphicalTesting
Class of GraphicalTesting
GroupSequentialTest
Class of GroupSequentialTest

Data generators and distribution helpers

DynamicRNGFunction()
A wrapper of random number generator.
PiecewiseConstantExponentialRNG()
Generate Time-to-Event Endpoint from Piecewise Constant Exponential Distribution
CorrelatedPfsAndOs2()
Generate Correlated PFS and OS Using Gumbel Copula
CorrelatedPfsAndOs3()
Generate Correlated PFS and OS Using the Three-States Illness-Death Model
CorrelatedPfsAndOs4()
Generate Correlated PFS, OS and Objective Response
rconst()
Generate Constant Variable
qPiecewiseExponential()
Quantile Function of Piecewise Exponential Distribution
solveMixtureExponentialDistribution()
Solve Parameters in a Mixture Exponential Distribution
solvePiecewiseConstantExponentialDistribution()
Compute Constant Rates of Piecewise Exponential Distribution
solveThreeStateModel()
Solve Parameters in a Three-State Illness-death Model
weibullDropout()
Calculate Parameters of Weibull Distribution as a Dropout Method

Summaries and utilities

summarizeDataFrame()
Summarize A Data Frame
summarizeMilestoneTime()
Summary of Milestone Time from Simulated Trials
plot(<milestone_time_summary>)
Plot Triggering Time of Milestones in Simulated Trials
plot(<three_state_model>)
Plot result of three-state illness-death model
expandRegimen()
Expand regimen trajectory into long format

R6 classes

Underlying classes; most users interact through the wrappers above.

Trials
Class of Trial
Arms
Class of Arm
Endpoints
Class of Endpoint
Milestones
Class of Milestones
Listeners
Class of Listener
Controllers
Class of Controller
Regimens
Class of Regimens