Learn R Programming

abd (version 0.1-21)

repeatability: Repeatability

Description

Calculate the repeatability (intraclass correlation coefficient) of observations in a random effects ANOVA fit by aov with Error() via the varcomps functon, a one-way ANOVA fit with aov(), or a or a linear mixed effects model fit by lme. The first two methods follow Lessels and Boag (1987).

Usage

repeatability(x)

Arguments

x
an object of class varcomps (from varcomps), class aov, or lme (from lme)

Value

  • repeatability returns a numeric value of the repeatability (intraclass correlations coefficient) with a class repeatability and rep.aov or rep.lme, depending on the class of x.

References

Lessels C.M, and P.T. Boag. 1987. Unrepeatable repeatabilities: a common mistake. Auk 104: 116-121.

See Also

varcomps, lme

Examples

Run this code
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