# Kidney data fitted by Clustered Inverse Gaussian Frailty Model
# \donttest{
InvG_real_cl = frailtyMM(Surv(time, status) ~ age + sex + cluster(id),
kidney, frailty = "invgauss")
InvG_real_cl
# Cgd data fitted by Recurrent Log-Normal Frailty Model
logN_real_re = frailtyMM(Surv(tstart, tstop, status) ~ sex + treat + cluster(id),
cgd, frailty = "gamma")
logN_real_re
# }
# Simulated data example
data(simdataCL)
# Parameter estimation under different model structure and frailties
# Clustered Gamma Frailty Model
gam_cl = frailtyMM(Surv(time, status) ~ . + cluster(id),
simdataCL, frailty = "gamma")
# \donttest{
# Clustered Log-Normal Frailty Model
logn_cl = frailtyMM(Surv(time, status) ~ . + cluster(id),
simdataCL, frailty = "lognormal")
# Clustered Inverse Gaussian Frailty Model
invg_cl = frailtyMM(Surv(time, status) ~ . + cluster(id),
simdataCL, frailty = "invgauss")
data(simdataME)
# Multi-event Gamma Frailty Model
gam_me = frailtyMM(Surv(time, status) ~ . + cluster(id),
simdataCL, frailty = "gamma")
# Multi-event Log-Normal Frailty Model
logn_me = frailtyMM(Surv(time, status) ~ . + event(id),
simdataME, frailty = "lognormal")
# Multi-event Inverse Gaussian Frailty Model
invg_me = frailtyMM(Surv(time, status) ~ . + event(id),
simdataME, frailty = "invgauss")
data(simdataRE)
# Recurrent event Gamma Frailty Model
gam_re = frailtyMM(Surv(start, end, status) ~ . + cluster(id),
simdataRE, frailty = "gamma")
# Recurrent event Log-Normal Frailty Model
logn_re = frailtyMM(Surv(start, end, status) ~ . + cluster(id),
simdataRE, frailty = "lognormal")
# Recurrent event Inverse Gaussian Frailty Model
invg_re = frailtyMM(Surv(start, end, status) ~ . + cluster(id),
simdataRE, frailty = "invgauss")
# }
# Obtain the summary statistics under fitted model
coef(gam_cl)
summary(gam_cl)
Run the code above in your browser using DataLab