Get the risk set at each bin over an equal distance grid
get_risk_obj(Y, by, max_T, id, is_for_discrete_model = T, n_threads = 1,
min_chunk = 5000)
Vector of outcome variable
Length of each bin
Last observed time
Vector with ids where entries match with outcomes Y
TRUE
/FALSE
for whether the model outcome is discrete. For example, a logit model is discrete whereas what is coined an exponential model in this package is a dynamic model
Set to a value greater than one to use mclapply
to find the risk object
Minimum chunk size of ids to use when parallel version is used.
A list with the following elements:
risk_sets
List of lists with one for each bin. Each of the sub lists have indices that corresponds to the entries of Y
that are at risk in the bin
min_start
Start time of the first bin
I_len
Length of each bin
d
Number of bins
is_event_in
Indices for which bin an observation Y
is an event. -1
if the individual does not die in any of the bins
is_for_discrete_model
Value of is_for_discrete_model
argument