Pigs {cv} | R Documentation |
Body Weights of 48 Pigs in 9 Successive Weeks
Description
This data set appears in Table 3.1 of Diggle, Liang, and Zeger (1994).
Usage
data("Pigs", package = "cv")
Format
A data frame with 432 rows and 3 columns.
- id
Pig id number, 1–48.
- week
Week number, 1–9.
- weight
Weight in kg.
Source
P. J. Diggle, K.-Y. Liang, and S. L. Zeger, Analysis of Longitudinal Data (Oxford, 1994).
Examples
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)
[Package cv version 2.0.0 Index]