
Compute the list of individuals at risk at landmark times
Source:R/landmarking.R
compute_risk_sets-Landmarking-method.Rd
Compute the list of individuals at risk at landmark times
Usage
# S4 method for class 'Landmarking'
compute_risk_sets(x, landmarks, ...)
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 relevant 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.