| enrollment | R Documentation |
Define a condition to trigger trial milestone by the number of randomized patients. The milestone will be triggered when a trial has enrolled at least the specified number of patients. It can be used combined with conditions specified by calendarTime and eventNumber.
Refer to the
vignette
to learn how to define milestones when performing simulation using
TrialSimulator.
enrollment(n, ..., arms = NULL, min_treatment_duration = 0)
n |
integer. Number of randomized patients. |
... |
subset conditions compatible with |
arms |
vector of character. Name of arms on which the number of patients
is counted. If |
min_treatment_duration |
numeric. Zero or positive value.
minimum treatment duration of enrolled patients.
Default is 0, i.e., looking for triggering time based on number of enrolled
patients in population specified by |
an object of class 'Condition'
## ensure sufficient sample size of whole trial
enrollment(n = 100)
## ensure sufficient sample size in sub-group of interest
enrollment(n = 100, biomarker1 == 'positive' & biomarker2 == 'high')
## ensure sufficient sample size in high dose + placebo
enrollment(n = 1000, arms = c('high dose', 'placebo'))
## ensure sufficient treatment duration
enrollment(n = 500, min_treatment_duration = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.