
Compute the list of individuals at risk at landmark times
Source:R/landmarking.R
compute_risk_sets.Rd
Compute the list of individuals at risk at landmark times
Arguments
- x
An object of class
Landmarking
.- landmarks
Numeric vector of landmark times
- ...
Additional arguments (not used)
Value
An object of class Landmarking
including desired risk
sets for the specified landmark times.
Details
A risk set describes all subjects still at risk (i.e., not experienced the event of interest or censored) at a given time. In Landmarking, risk sets define which subjects should be included in the longitudinal and survival sub-models for each landmark time.
The risk sets are stored in the risk_sets
slot of the Landmarking
object, where each risk set is a list of indices corresponding to the
subjects at risk at the respective landmark time.