This function adds an event index to each row of the expanded
endpoints data.table
. The event index is created based on variable-value
pairs and singleton conditions that define specific events of interest
within the dataset. This index can be used to identify events in the
user-supplied criteria and/or statistical functions
Arguments
- ep
A
data.table
that contains expanded endpoint definitions, typically the output fromexpand_over_endpoints
. It assumes the inclusion of the columnspop_var
,pop_value
,period_var
,period_value
,endpoint_filter
,endpoint_group_filter
, andcustom_pop_filter
, which are used to define the conditions for event indexing.- analysis_data_container
A data.table containing the analysis data.
Value
A data.table
similar to the input but with an additional
event_index
column, which contains the indices of events as determined by
the specified conditions for each endpoint. The indices refer to the
INDEX_
column in the clinical data. This INDEX_
column is created by
chef when a user supplies a clinical dataset.