epil2: Seizure Counts for Epileptics - Extended

epil2R Documentation

Seizure Counts for Epileptics - Extended

Description

Extended version of the epil dataset of the MASS package. The three transformed variables Visit, Base, and Age used by Booth et al. (2003) have been added to epil.

Usage

epil2

Format

A data frame with 236 observations on the following 12 variables:

y

an integer vector.

trt

a factor with levels "placebo" and "progabide".

base

an integer vector.

age

an integer vector.

V4

an integer vector.

subject

an integer vector.

period

an integer vector.

lbase

a numeric vector.

lage

a numeric vector.

Visit

(rep(1:4,59) - 2.5) / 5.

Base

log(base/4).

Age

log(age).

References

Booth, J.G., G. Casella, H. Friedl, and J.P. Hobert. (2003) Negative binomial loglinear mixed models. Statistical Modelling 3, 179–191.

Examples


epil2$subject <- factor(epil2$subject)
op <- options(digits=3)
(fm <- glmmTMB(y ~ Base*trt + Age + Visit + (Visit|subject),
              data=epil2, family=nbinom2))
meths <- methods(class = class(fm))
if((Rv <- getRversion()) > "3.1.3") {
  funs <- attr(meths, "info")[, "generic"]
  funs <- setdiff(funs, "profile")  ## too slow! pkgdown is trying to run this??
  for(fun in funs[is.na(match(funs, "getME"))]) {
        cat(sprintf("%s:\n-----\n", fun))
        r <- tryCatch( get(fun)(fm), error=identity)
        if (inherits(r, "error")) cat("** Error:", r$message,"\n")
        else tryCatch( print(r) )
        cat(sprintf("---end{%s}--------------\n\n", fun))
  }
}
options(op)


glmmTMB documentation built on Sept. 30, 2024, 9:34 a.m.