Stack cumulative risk curves from each treatment group in a results object (or list of objects) in a matrix

stack_cumrisk(..., risk_time = NULL)

Arguments

...

An cumrisk object or list of cumrisk objects est_ipwrisk

risk_time

The time at which to compute the cumulative risk (default risk_time = NULL, returns all observed times in supplied object)

Value

A data frame with one row per time point per treatment group, containing the following columns:

  • time: the time point

  • crisk: the cumulative risk estimate

  • crisk_var: the variance of the cumulative risk estimate

  • group_label: the treatment group label

  • grp1, grp2: the first and second elements of the object's labels (only present when more than one object is passed to ...)

  • obj_id: the 1-based positional index of the object passed to ...

Author

M. Alan Brookhart