
Triggering condition by number of events or observations of an endpoint
Source:R/eventNumber.R
eventNumber.Rd
Define a condition to trigger trial milestone by the number of events of a time-to-event endpoint or the number of non-missing observations of a non-time-to-event endpoint. The milestone will be triggered when a trial has observed at least the specified number of endpoint events (or non-missing observations). It can be used combined with conditions specified by calendarTime and enrollment.
Number of events for a time-to-event endpoint can vary at different milestones as more patients are randomized into a trial, or more events onset over time.
Number of non-missing observations for a non-time-to-event endpoint can vary
at different milestones as more patients are randomized into a trial, or more
patients have been treated until their readout time (thus, NA
turns
to a value).
Arguments
- endpoint
character. Name of an endpoint.
- n
integer. Targeted number of events.
- ...
subset conditions compatible with
dplyr::filter
. Number of events will be counted on subset of trial data only.- arms
vector of character. Name of arms on which the number of events is counted. If
NULL
, use all arms that are not yet removed from the trial by the time of calculation.