EVOLUTION-MANAGER
Edit File: epil.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Seizure Counts for Epileptics</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for epil {MASS}"><tr><td>epil {MASS}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Seizure Counts for Epileptics </h2> <h3>Description</h3> <p>Thall and Vail (1990) give a data set on two-week seizure counts for 59 epileptics. The number of seizures was recorded for a baseline period of 8 weeks, and then patients were randomly assigned to a treatment group or a control group. Counts were then recorded for four successive two-week periods. The subject's age is the only covariate. </p> <h3>Usage</h3> <pre> epil </pre> <h3>Format</h3> <p>This data frame has 236 rows and the following 9 columns: </p> <dl> <dt><code>y</code></dt><dd> <p>the count for the 2-week period. </p> </dd> <dt><code>trt</code></dt><dd> <p>treatment, <code>"placebo"</code> or <code>"progabide"</code>. </p> </dd> <dt><code>base</code></dt><dd> <p>the counts in the baseline 8-week period. </p> </dd> <dt><code>age</code></dt><dd> <p>subject's age, in years. </p> </dd> <dt><code>V4</code></dt><dd> <p><code>0/1</code> indicator variable of period 4. </p> </dd> <dt><code>subject</code></dt><dd> <p>subject number, 1 to 59. </p> </dd> <dt><code>period</code></dt><dd> <p>period, 1 to 4. </p> </dd> <dt><code>lbase</code></dt><dd> <p>log-counts for the baseline period, centred to have zero mean. </p> </dd> <dt><code>lage</code></dt><dd> <p>log-ages, centred to have zero mean. </p> </dd> </dl> <h3>Source</h3> <p>Thall, P. F. and Vail, S. C. (1990) Some covariance models for longitudinal count data with over-dispersion. <em>Biometrics</em> <b>46</b>, 657–671. </p> <h3>References</h3> <p>Venables, W. N. and Ripley, B. D. (2002) <em>Modern Applied Statistics with S.</em> Fourth Edition. Springer. </p> <h3>Examples</h3> <pre> summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"] epil["time"] <- 1; epil2["time"] <- 4 epil2 <- rbind(epil, epil2) epil2$pred <- unclass(epil2$trt) * (epil2$period > 0) epil2$subject <- factor(epil2$subject) epil3 <- aggregate(epil2, list(epil2$subject, epil2$period > 0), function(x) if(is.numeric(x)) sum(x) else x[1]) epil3$pred <- factor(epil3$pred, labels = c("base", "placebo", "drug")) contrasts(epil3$pred) <- structure(contr.sdif(3), dimnames = list(NULL, c("placebo-base", "drug-placebo"))) summary(glm(y ~ pred + factor(subject) + offset(log(time)), family = poisson, data = epil3), cor = FALSE) summary(glmmPQL(y ~ lbase*trt + lage + V4, random = ~ 1 | subject, family = poisson, data = epil)) summary(glmmPQL(y ~ pred, random = ~1 | subject, family = poisson, data = epil3)) </pre> <hr /><div style="text-align: center;">[Package <em>MASS</em> version 7.3-51.4 <a href="00Index.html">Index</a>]</div> </body></html>