Implementation based on MES::QIC.geeglm
QIC(object)
is a aftgee
fit
## Simulate data from an AFT model with possible depended response
datgen <- function(n = 100, tau = 0.3, dim = 2) {
x1 <- rbinom(dim * n, 1, 0.5)
x2 <- rnorm(dim * n)
e <- c(t(exp(MASS::mvrnorm(n = n, mu = rep(0, dim), Sigma = tau + (1 - tau) * diag(dim)))))
tt <- exp(2 + x1 + x2 + e)
cen <- runif(n, 0, 100)
data.frame(Time = pmin(tt, cen), status = 1 * (tt < cen),
x1 = x1, x2 = x2, id = rep(1:n, each = dim))
}
set.seed(1); dat <- datgen(n = 50, dim = 2)
fm <- Surv(Time, status) ~ x1 + x2
fit1 <- aftgee(fm, data = dat, id = id, corstr = "ind", B = 8)
fit2 <- aftgee(fm, data = dat, id = id, corstr = "ex", B = 8)
QIC(fit1)
#> QIC QICu Quasi Lik CIC params QICC
#> 170.409710 170.295488 -82.147744 3.057111 3.000000 170.659710
QIC(fit2)
#> QIC QICu Quasi Lik CIC params QICC
#> 168.997928 169.068272 -81.534136 2.964828 3.000000 169.418980