SurvIC | R Documentation |
This is a function used in case of interval-censoring as a response variable in a model formula only for Cox proportional hazard or shared frailty model. Sometimes, an unobserved event might occur in a time interval [L,U]. RecurrentAG argument gets invalid with the use of SurvIC. Note that this function used a Kronecker product which can suffer from computation issue when the number of subjects in each cluster is high. Time dependent variables are not allowed.
SurvIC(t0, lower, upper, event)
t0 |
Truncation time for left truncated data only. To be ignored otherwise. |
lower |
Starting time of the interval for interval-censored data. Time of right-censoring instead. |
upper |
Ending time of the interval for interval-censored data. For right-censored data, lower and upper time must be equal (for numerical reason). |
event |
Status indicator 0=right-censored, 1=interval-censored |
Typical usages are SurvIC(lower,upper,event)
or
SurvIC(t0,lower,upper,event)
No return value
data(bcos)
bcos$event <- ifelse(bcos$left!=bcos$right,1,0)
###--- Cox proportional hazard model with interval censoring ---###
cox.ic <- frailtyPenal(SurvIC(left,right,event)~treatment,
data=bcos,n.knots=8,kappa=10000)
###--- Shared model with interval censoring ---###
bcos$group <- c(rep(1:20,4),1:14)
sha.ic <- frailtyPenal(SurvIC(left,right,event)~cluster(group)+
treatment,data=bcos,n.knots=8,kappa=10000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.