Simulate Participant Accrual Times
Arguments
- n
Number of participants
- accrual_periods
Vector of right endpoints defining the time periods of accrual, e.g., c(6,8) defines 0<=x<6, 6<=x<8.
- accrual_props
Vector indicating the proportion of participants that are expected to be enrolled during each of the defined accrual periods. Should sum to 1, otherwise these proportions will be normalized.
Details
Simulate the accrual times for each participant, where
accrual_periods defines the right time points for each accrual period
(with the last element corresponding to the end of accrual), and
accrual_props defines the proportion of study participants who are
enrolled during each of these periods. The simulated accrual times for
participants within a given accrual period are assumed to be uniformly
distributed.
