24.8 癫痫病发作次数

纵向数据 (Thall and Vail 1990),考虑了过度发散 overdispersion 异方差 heteroscedasticity 观测不独立

数据集 epil 记录癫痫发作的次数及病人的特征,下面是数据建模分析过程

data(epil, package = "MASS")
fit_glm_epil <- glm(y ~ lbase * trt + lage + V4,
  family = poisson,
  data = epil
)
summary(fit_glm_epil)

fit_glmm_epil<- MASS::glmmPQL(y ~ lbase * trt + lage + V4,
  random = ~ 1 | subject,
  family = poisson, data = epil
)
summary(fit_glmm_epil)

fit_glmm_lme4 <- lme4::glmer(y ~ lbase * trt + lage + V4 + (1 | subject),
  family = poisson, data = epil
)
summary(fit_glmm_lme4)


fit_glmm_glmmtmb <- glmmTMB::glmmTMB(y ~ lbase * trt + lage + V4 + (1 | subject),
  data = epil, family = poisson, REML = TRUE
) # REML 估计
summary(fit_glmm_glmmtmb)


# https://github.com/drizopoulos/GLMMadaptive
fit_glmm_glmmadaptive <- GLMMadaptive::mixed_model(
  fixed = y ~ lbase * trt + lage + V4,
  random = ~ 1 | subject, data = epil,
  family = poisson()
)
summary(fit_glmm_glmmadaptive)

参考文献

Thall, Peter F., and Stephen C. Vail. 1990. “Some Covariance Models for Longitudinal Count Data with Overdispersion.” Biometrics 46 (3): 657–71. https://www.jstor.org/stable/2532086.