powered by
Create a competing risk object, used as a response variable in the model formula for fastCrr and fastCrrp. Adapted from the Surv object.
fastCrr
fastCrrp
Surv
Crisk(ftime, fstatus, cencode = 0, failcode = 1, silent = TRUE)
A vector of event/censoring times.
A vector with unique code for each event type and a separate code for censored observations.
Integer: code of fstatus that denotes censored observations (default is 0)
fstatus
Integer: code of fstatus that event type of interest (default is 1)
Logical: print information about coding.
Returns an object, used as a response variable, of class Crisk.
Crisk
vector of observed event times
vector of event indicators. 0 = censored, 1 = event of interest, 2 = competing risks
Fine J. and Gray R. (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.
# NOT RUN { library(fastcmprsk) set.seed(10) ftime <- rexp(200) fstatus <- sample(0:2, 200, replace = TRUE) obj <- Crisk(ftime, fstatus, silent = FALSE) # }
Run the code above in your browser using DataLab