Pigs | R Documentation |
This data set appears in Table 3.1 of Diggle, Liang, and Zeger (1994).
data("Pigs", package = "cv")
A data frame with 432 rows and 3 columns.
Pig id number, 1–48.
Week number, 1–9.
Weight in kg.
P. J. Diggle, K.-Y. Liang, and S. L. Zeger, Analysis of Longitudinal Data (Oxford, 1994).
library("lme4")
m.p <- lmer(weight ~ week + (1 | id) + (1 | week),
data=Pigs, REML=FALSE,
control=lmerControl(optimizer="bobyqa"))
summary(m.p)
cv(m.p, clusterVariables=c("id", "week"), k=10, seed=8469)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.