View source: R/user_utilities.R
getSCurves | R Documentation |
Extracts the estimated survival curve(s) from an ic_sp or ic_np model for interval censored data.
getSCurves(fit, newdata = NULL)
fit |
model fit with |
newdata |
data.frame containing covariates for which the survival curve will be fit to.
Rownames from |
Output will be a list with two elements: the first item will be $Tbull_ints
,
which is the Turnbull intervals.
This is a k x 2 matrix, with the first column being the beginning of the
Turnbull interval and the second being the end.
This is necessary due to the representational non-uniqueness;
any survival curve that lies between the survival curves created from the
upper and lower limits of the Turnbull intervals will have equal likelihood.
See example for proper display of this. The second item is $S_curves
,
or the estimated survival probability at each Turnbull interval for individuals
with the covariates provided in newdata
. Note that multiple rows may
be provided to newdata, which will result in multiple S_curves.
Clifford Anderson-Bergman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.