# get_risk_obj

0th

Percentile

##### 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, n_threads = 1,
min_chunk = 5000)
##### 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

Set to a value greater than one to use mclapply to find the risk object

min_chunk

Minimum chunk size of ids to use when parallel version is used.

##### 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

is_for_discrete_model

Value of is_for_discrete_model argument

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

### Community examples

Looks like there are no examples yet.