# Nested frailty model
data(dataNested)
modNested <- frailtyPenal(Surv(t1,t2,event)~cluster(group)+subcluster(subgroup)+
cov1+cov2,Frailty=TRUE,data=dataNested,n.knots=8,kappa1=50000,
kappa2=50000,hazard="Splines")
# It takes around 24 minutes to converge (depends on the processor) #
print(modNested)
Run the code above in your browser using DataLab