Convenient function to build cause-specific, parametric survival models using the survival package. This is followed by application of cfc
function to produce cumulative incidence functions.
cfc.survreg(formula, data, newdata = NULL, dist = "weibull"
, control = survreg.control(), tout, Nmax = 100L
, rel.tol = 1e-05)
A list with the following elements:
Number of causes.
List of formulas used in each of the K
cause-specific survival regression models.
List of all cause-specific regression objects returned by survreg
, one per cause. The x
field of each regression object has been substituted by the model matrix from newdata
.
Same as input.
An object of class cfc
, the output of applying cfc
to the parametric survival regression models constructed using survreg
from survival package.
Survival formula with a multi-state status variable. See cfc.prepdata
.
Data frame containing variables listed in formula
.
Data frame of structure similar to data
, perhaps without the time and status columns, to be used for generating cumulative incidence curves.
One of survreg.distributions
. It can also be a vector, in which case elements 1
through K
(number of causes) will be extracted and assigned to each cause-specific survival model. This allows for using different distributions for different causes.
List of survreg
control parameters, according to survreg.control
.
Time points, along which to produce the cumulative incidence curves.
Maximum number of subdivisions to be used in the cfc
quadrature algorithm.
Threshold for relative error in cfc
quadrature, used as a stoppage criterion. See cfc
for details.
Mansour T.A. Sharabiani, Alireza S. Mahani
Mahani A.S. and Sharabiani M.T.A. (2019). Bayesian, and Non-Bayesian, Cause-Specific Competing-Risk Analysis for Parametric and Nonparametric Survival Functions: The R Package CFC. Journal of Statistical Software, 89(9), 1-29. doi:10.18637/jss.v089.i09
cfc.prepdata
, cfc
data(bmt)
formul <- Surv(time, cause) ~ platelet + age + tcell
ret <- cfc.survreg(formul, bmt[1:300, ], bmt[-(1:300), ]
, Nmax = 300, rel.tol = 1e-3)
Run the code above in your browser using DataLab