data(WalkingStickFemurs)
# With aov() and Error()
Error.fit <- aov(femur.length ~ 1 + Error(specimen), data = WalkingStickFemurs)
vc <- varcomps(Error.fit, n = 2)
vc
repeatability(vc)
# With aov()
aov.fit <- aov(femur.length ~ specimen, data = WalkingStickFemurs)
repeatability(aov.fit)
# With lme()
lme.fit <- lme(femur.length ~ 1, random = ~ 1 | specimen,
data = WalkingStickFemurs)
repeatability(lme.fit)
Run the code above in your browser using DataLab