epil(MASS)
epil()所属R语言包:MASS
Seizure Counts for Epileptics
癫痫扣押计数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
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.
thall和韦尔(1990)扣押两个星期计数为59癫痫数据。缉获数量录得的基准期为8周,然后患者被随机分配到治疗组或对照组。计数,然后记录为四个连续两个星期的时期。主体的年龄是唯一的协。
用法----------Usage----------
epil
格式----------Format----------
This data frame has 236 rows and the following 9 columns:
这个数据框有236行,以下9列:
the count for the 2-week period.
2星期内计数。
treatment, "placebo" or "progabide".
治疗,"placebo"或"progabide"。
the counts in the baseline 8-week period.
基准8周期间计数。
subject's age, in years.
受测者的年龄,年。
0/1 indicator variable of period 4.
0/1第4期的指示变量。
subject number, 1 to 59.
主题数,1到59。
period, 1 to 4.
期间,1至4。
log-counts for the baseline period, centred to have zero mean.
日志数为基准期,围绕零均值。
log-ages, centred to have zero mean.
记录年龄,集中到零均值。
源----------Source----------
Thall, P. F. and Vail, S. C. (1990) Some covariance models for longitudinal count data with over-dispersion. Biometrics 46, 657–671.
thall,PF和维尔SC(1990)有些过度分散的纵向计数数据的协方差模型。生物识别技术46,657-671。
参考文献----------References----------
Modern Applied Statistics with S. Fourth Edition. Springer.
举例----------Examples----------
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))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|