Why Simulate Event Accrual?
An event target is reached when enough eligible events have been observed, not simply when a planned number of participants has enrolled. With staggered entry, varying follow-up, loss to follow-up, and changing event rates, the target date can vary from one plausible trial realization to another. A Monte Carlo projection represents that variation by repeatedly generating trial timelines under a specified model.
The result is a distribution of possible target dates under the assumptions used in the simulation. It can summarize quantities such as the probability of reaching the target by a deadline or the median projected date. It is a model-based forecast, not a guarantee about the future trial and not a substitute for checking whether the assumptions are credible.
Define the Simulated Trial
Begin by specifying how participants enter, how their event times are generated, and how censoring occurs. These choices must match the design and the intended event-count definition. Enrollment may be fixed at planned dates, generated from a recruitment model, or generated in batches. Event-time distributions may differ by treatment group and may have time-varying hazards. For example, under a piecewise-constant hazard, the cumulative hazard increases at different rates over specified follow-up intervals.
If follow-up ends at a common calendar cutoff, participant \(i\)'s administrative follow-up time is \(\max(0,C-E_i)\). The event must occur by that time as well as before loss to follow-up. Equivalently, the participant's observed follow-up ends at the earliest of the event, loss to follow-up, and administrative cutoff. An event exactly at a cutoff can be counted if that is the protocol's convention; state and implement the convention consistently.
A standard starting assumption is that, conditional on treatment group and any modeled covariates, event times follow specified survival distributions and dropout times are independent of event times. This assumption is not automatic. If participants at higher event risk are also more likely to leave follow-up, generate event and dropout times from a joint model or an appropriate conditional model rather than sampling them independently. Enrollment and outcome times can also be dependent; for example, if recruitment rates change in response to trial progress, an independent enrollment model may not represent operations.
Generate Times and Count Events
For a continuous event-time distribution with survival function \(S_a(u)\) in group \(a\), an inverse-survival draw can be obtained from a uniform random variable \(U\) on \((0,1)\): generate \(T\) satisfying \(S_a(T)=U\). When a cumulative hazard \(H_a(u)=-\log S_a(u)\) is available, this is equivalent to solving \(H_a(T)=-\log U\). For a piecewise hazard, accumulate the hazard over intervals until the generated cumulative-hazard value is reached, then solve within that interval. This accommodates time-varying hazards without assuming proportional hazards.
Generate dropout time in the same way from its specified distribution, unless the model explicitly links dropout and event time. For each participant, compare the event calendar date \(E_i+T_i\) with the dropout date \(E_i+L_i\) and the administrative cutoff. Keep the event date only if the event is observed under the chosen rules. Sort the retained event dates; the \(D\)th date in that ordered list is the replicate's target date, if at least \(D\) dates are present.
Set the event target, allocation, recruitment schedule or enrollment model, follow-up distributions, dropout model, administrative cutoff, and simulation horizon.
Draw enrollment times and, for each participant, an event time and censoring time according to the specified model.
Retain only events occurring before loss to follow-up and within the administrative observation window.
Store the date of the \(D\)th observed event, or record that the target was not reached within the horizon.
Use many independent replicates to estimate target-date probabilities and quantiles, while reporting Monte Carlo precision.
Worked Examples
Worked Example: Generating One Participant’s Event and Dropout Times
Suppose a hypothetical participant enrolls at calendar month 2.0. For illustration, assume a constant event hazard of \(0.12\) per month and an independent constant dropout hazard of \(0.03\) per month. Both times are exponential, and the administrative cutoff is month 12. In one simulation draw, let the uniforms used for the event and dropout times be \(U_E=0.30\) and \(U_L=0.80\).
For an exponential event time with rate \(\lambda_E\), \(T=-\log(U_E)/\lambda_E\). Thus, $$ T=\frac{-\log(0.30)}{0.12} =\frac{1.2039728\ldots}{0.12} =10.0331\text{ months}. $$ For the independent exponential dropout time, $$ L=\frac{-\log(0.80)}{0.03} =\frac{0.2231436\ldots}{0.03} =7.4381\text{ months}. $$
The simulated event would occur at calendar month \(2.0+10.0331=12.0331\), after the cutoff. More importantly, it occurs after the simulated dropout at month \(2.0+7.4381=9.4381\). This participant contributes no observed event by month 12. The calculation illustrates why event time alone is not enough: enrollment, censoring, and the calendar cutoff determine whether an event enters the count.
Worked Example: Finding a Target Date in One Replicate
Consider a hypothetical replicate with four participants, a target of \(D=3\) events, and an administrative cutoff at calendar month 8. Enrollment times are months 0, 1, 2, and 3. The simulated event times \(T_i\) and dropout times \(L_i\), both measured in months after enrollment, are shown below.
| Participant | Enrollment \(E_i\) | Event time \(T_i\) | Dropout time \(L_i\) | Observed event date? |
|---|---|---|---|---|
| 1 | 0 | 4 | 8 | Yes, month 4 |
| 2 | 1 | 2 | 6 | Yes, month 3 |
| 3 | 2 | 5 | 3 | No; dropout precedes the event |
| 4 | 3 | 1 | 5 | Yes, month 4 |
For participant 1, the event occurs at \(0+4=4\), before both dropout and the cutoff. Participant 2's event occurs at \(1+2=3\), also before dropout and the cutoff. Participant 3 would have an event at month \(2+5=7\), but dropout occurs at month \(2+3=5\), so the event is not observed. Participant 4's event occurs at month \(3+1=4\), before dropout and the cutoff.
The observed event dates are therefore 3, 4, and 4. The third observed event occurs at month 4, so this replicate reaches the target at calendar month 4. If event dates are stored only by whole months, ties can arise; count all events due by that date according to the protocol's event-date convention.
Worked Example: Estimating a Deadline Probability From Replicates
Suppose eight hypothetical simulation replicates produce the following target dates, in months from trial start: 16, 17, 19, 15, 18, 20, 22, and not reached by the month-24 horizon. The deadline is month 20.
Six of the eight replicates reach the target by month 20, so the Monte Carlo estimate of the probability of reaching the target by that deadline is $$ \widehat{P}(T_D\leq 20)=\frac{6}{8}=0.75. $$ The estimated probability is 75% under the simulated model. This small illustration is imprecise: the estimated Monte Carlo standard error is $$ \sqrt{\frac{0.75(1-0.75)}{8}}=0.1531. $$ A production projection should use many more replicates.
For the empirical target-date distribution, sort reached dates as 15, 16, 17, 18, 19, 20, and 22, and treat the unreached replicate as beyond the horizon. Using the convention that a quantile is the smallest date at which the empirical cumulative probability reaches the requested level, the median is month 18: four of the eight replicates have reached the target by then. The nonreach outcome remains important; reporting only the seven reached dates would describe timing conditional on reaching the target, not the full simulated outcome.
What the Simulation Estimates
Let \(T_D\) denote the target date, including the possibility of not reaching the target by a specified horizon. For any deadline \(t\), reaching the target by \(t\) is equivalent to having at least \(D\) observed events by \(t\). This gives a simple justification for estimating the deadline probability by the fraction of replicates that meet the target.
For date quantiles, sort the replicate target dates and use a stated empirical-quantile convention. A quantile can be beyond the simulation horizon if enough replicates fail to reach the target. Report the nonreach fraction or extend the horizon when appropriate; do not silently discard nonreaching replicates. A mean target date among reached replicates is a conditional summary and should be labeled as such.
Monte Carlo standard error measures simulation noise from using a finite number of replicates. It does not measure uncertainty in assumed recruitment rates, survival curves, dropout rates, or other model inputs. A very large \(B\) can make the simulated estimate numerically stable while the forecast remains sensitive to uncertain assumptions.
Diagnostics, Alternatives, and Limitations
Check both the implementation and the output. Useful checks include confirming that generated enrollment dates follow the intended recruitment pattern; generated event times reproduce the specified survival curves; dropout and administrative censoring are applied on the correct time scale; and no event is counted before enrollment or after its censoring date. Compare simulated event counts at selected calendar times with available analytic expectations or variance calculations. Such comparisons can reveal coding errors, although agreement in a few summaries does not prove that the full model is correct.
- Too few or no events. If many replicates fail to reach the target, check whether the horizon, enrollment duration, or event-time scale was entered correctly. If the inputs are correct, nonreach may be a genuine feature of the specified model.
- Unexpected timing patterns. Abrupt jumps or implausible gaps in dates can point to a unit conversion error, a boundary error in a piecewise hazard, or incorrect handling of enrollment dates.
- Unstable estimates. Repeat the projection with a larger \(B\), or calculate the Monte Carlo standard error. If the estimate changes materially across runs, the number of replicates may be inadequate for the requested precision.
- Dependence ignored. Independent event and dropout draws can be misleading when loss to follow-up is informative. A censoring model should reflect the dependence structure needed for the intended projection.
A deterministic projection based on an expected event count can be useful for a central planning estimate, and earlier material on variance and prediction intervals for event counts supplies additional summaries at fixed calendar times. Monte Carlo projection goes further by representing individual entry and censoring times and directly producing a distribution of target dates. It costs more computation and depends on a more detailed model. Neither approach removes uncertainty from misspecified inputs, unmodeled operational changes, or dependence that the model omits.
The projection is conditional on its design and assumptions. If the event-time model does not reflect delayed or changing treatment effects, for example, the simulated timing can be wrong even when the random-number generation is flawless. Keep the event model, recruitment plan, censoring rules, and event-target definition aligned with the trial question. Report the assumptions, horizon, number of replicates, nonreach fraction, and Monte Carlo precision alongside the forecast.
Common Mistakes
- Counting latent events after censoring. The correction is to count only events observed before loss to follow-up and the administrative cutoff.
- Using time since trial start for every participant. Event and dropout distributions are usually specified in time since enrollment; convert to calendar dates by adding \(E_i\).
- Dropping replicates that miss the target. Record nonreach explicitly. Otherwise, reported date summaries may incorrectly appear to represent all simulated trials.
- Calling Monte Carlo error forecast uncertainty. The standard error of a simulated proportion reflects finite simulation size, not uncertainty in the survival or enrollment assumptions.
- Rounding intermediate calculations too early. Retain full precision through calculations and round only the reported result. For example, if cumulative hazard is \(0.600\) at month 6 and then increases at \(0.20\) per month, the median event time under that hazard satisfies \(H(t)=-\log(0.50)\). Thus, $$ t=6+\frac{-\log(0.50)-0.600}{0.20} =6.465735\ldots\approx6.466\text{ months}. $$ Using the unrounded required cumulative hazard gives the correct value; substituting a rounded intermediate value can distort the reported additional time.
Check Your Understanding
Try each question, then compare your reasoning with the solutions.
- A participant enrolls at month 5, has event time 4 months, dropout time 6 months, and the administrative cutoff is month 9. Is the event counted, and on what date?
- In 12,000 independent replicates, 8,640 reach the event target by a specified deadline. Calculate the estimated probability and its Monte Carlo standard error.
- Why is it misleading to calculate a median target date using only replicates that reach the target, without saying so?
- If dropout is associated with latent event risk, what change to the simulation model may be needed?
Solutions. (1) The event date is \(5+4=9\) months, which equals the cutoff and occurs before dropout at month 11. Under the stated convention that events at the cutoff are included, it is counted at month 9. (2) The estimated probability is \(8640/12000=0.72\). Its Monte Carlo standard error is \(\sqrt{0.72(0.28)/12000}=\sqrt{0.0000168}\approx0.00410\), or about 0.410 percentage points. (3) That median describes timing conditional on reaching the target; it omits the probability mass for nonreach and can give an overly favorable impression of the full outcome. (4) Replace independent draws with a joint or appropriately conditional model for event and dropout times that represents their dependence.