get_risk_obj

Get the risk set at each bin over an equal distance grid

Get the risk set at each bin over an equal distance grid

Usage
get_risk_obj(Y, by, max_T, id, is_for_discrete_model = T)
Arguments
Y
Vector of outcome variable
by
Length of each bin
max_T
Last observed time
id
Vector with ids where entries match with outcomes Y
is_for_discrete_model
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
Value

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

Aliases
  • get_risk_obj
Documentation reproduced from package dynamichazard, version 0.1.0, License: GPL-2

Community examples

Looks like there are no examples yet.