if (FALSE) {
set.seed(2015)
sim <- simfrail(1000,
genfrail.args=alist(beta=c(log(2),log(3)), frailty="gamma",
censor.rate=0.30, N=300, K=2, theta=2,
covar.distr="uniform", covar.param=c(0, 1),
Lambda_0=function(t, tau=4.6, C=0.01) (C*t)^tau),
fitfrail.args=alist(formula=Surv(time, status) ~ Z1 + Z2
+ cluster(family),
frailty="gamma"),
Lambda.times=1:120)
# Make a boxplot of residuals
plot(sim, type="residuals")
# Plot the mean estimated cumulative baseline hazard and empirical 0.95 CI
plot(sim, type="cumhaz")
}
Run the code above in your browser using DataLab