| format_long_hazards | R Documentation | 
Generate Augmented Repeated Measures Data for Pooled Hazards Regression
format_long_hazards(
  A,
  W,
  wts = rep(1, length(A)),
  grid_type = c("equal_range", "equal_mass"),
  n_bins = NULL,
  breaks = NULL
)
| A | The  | 
| W | A  | 
| wts | A  | 
| grid_type | A  | 
| n_bins | Only used if  | 
| breaks | A  | 
Generates an augmented (long format, or repeated measures) dataset that includes multiple records for each observation, a single record for each discretized bin up to and including the bin in which a given observed value of A falls. Such bins are derived from selecting break points over the support of A. This repeated measures dataset is suitable for estimating the hazard of failing in a particular bin over A using a highly adaptive lasso (or other) classification model.
A list containing the break points used in dividing the
support of A into discrete bins, the length of each bin, and the
reformatted, "repeated measures" dataset. The reformatted dataset is a
data.table of repeated entries for observations
up until the bin in which their A falls, including an indicator for
which bin an observation falls in, the bin ID, observation ID, values of
W for each observation, and, possibly, observation-level weights.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.