R: Seizure Counts for Epileptics - Extended

epil2 {glmmTMB} | R 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"])
        for(F in funs[is.na(match(funs, "getME"))]) {
            cat(sprintf("%s:\n-----\n", F))
            r <- tryCatch( get(F)(fm), error=identity)
            if (inherits(r, "error")) cat("** Error:", r$message,"\n")
            else tryCatch( print(r) )
            cat(sprintf("---end{%s}--------------\n\n", F))
        }
    }
    options(op)

[Package glmmTMB version 0.2.2.0 Index]