Learn R Programming

brms (version 0.1.0)

epilepsy: Epileptic seizure counts

Description

Breslow and Clayton (1993) analyse data initially provided by Thall and Vail (1990) concerning seizure counts in a randomised trial of anti-convulsant therapy in epilepsy. Covariates are treatment, 8-week baseline seizure counts, and age of the patients in years.

Usage

epilepsy

Arguments

source

Thall, P. F., & Vail, S. C. (1990). Some covariance models for longitudinal count data with overdispersion. Biometrics, 46(2), 657-671. Breslow, N. E., & Clayton, D. G. (1993). Approximate inference in generalized linear mixed models. Journal of the American Statistical Association, 88(421), 9-25.

Examples

Run this code
# poisson regression without random effects.
# family = c("poisson", "log") is equivalent to family = "poisson"
fit_e1 <- brm(count ~ log_Age_c + log_Base4_c * Trt_c,
            data = epilepsy, family = c("poisson", "log"))
brm.plot(fit_e1)
print(fit_e1)

# poisson regression with random intercepts over patients and visits
# as well as normal priors for fixed effects parameters.
fit_e2 <- brm(count ~ log_Age_c + log_Base4_c * Trt_c + (1|patient) + (1|visit),
            data = epilepsy, family = c("poisson", "log"), prior = list(b = "normal(0,5)"))
brm.plot(fit_e2)
print(fit_e2)

Run the code above in your browser using DataLab