data(diabetes)
# here is created the needed variable event
diabetes <- transform(diabetes,event=ifelse(left!=right,1,0))
# here is created a hypothetical groupement
diabetes$groupe <- rep(1:146,c(rep(5,145),6))
### Cox proportional hazard model with interval censoring ###
frailtyPenal(SurvIC(left,right,event)~gender,
data=diabetes,Frailty=FALSE,n.knots=8,cross.validation=FALSE,
kappa1=3309,intcens=TRUE)
### Shared model with interval censoring ###
frailtyPenal(SurvIC(left,right,event)~cluster(groupe)+gender,
data=diabetes,Frailty=TRUE,n.knots=8,cross.validation=FALSE,
kappa1=3309,intcens=TRUE)Run the code above in your browser using DataLab