Subject recruitment is assumed to follow a (piecewise stationary)
Poisson process. We assume trial recruitment to be an independent process,
thus the 'memoryless' property modelling of subject recruitment is used.
Since the subject recruitment rate can vary over time, we can account for
differential rates over time. Note that the first trial enrollment is
assumed to occur at time zero.
To illustrate, suppose we use a piecewise function to specify the change in
enrollment rate over time:
$$
\lambda = \left\{
\begin{array}{ll}
0.3 & \textrm{time} \in [0, 5) \\
0.7 & \textrm{time} \in [5, 10) \\
0.9 & \textrm{time} \in [10, 15) \\
1.2 & \textrm{time} \in [15, \infty) \\
\end{array}
\right.
$$
Then, to simulate individual patient enrollment dates with a sample size
(N_total
) of 50, we use
enrollment(lambda = c(0.3, 0.7, 0.9, 1.2), N_total = 50, lambda_time = c(0, 5, 10, 15))