Learn R Programming

abd (version 0.1-21)

varcomps: Variance Components

Description

Extract variance components from a mixed-model ANOVA (i.e., fit with + Error(...)).

Usage

varcomps(fm, n)

Arguments

fm
an fitted model of class aov
n
an integer giving the within-group sample size

Value

  • varcomps returns a list of class varcomps with the following components:
  • MS.groupsGroup mean square
  • MS.errorError mean square
  • FF-statistic
  • df1Numerator degrees of freedom
  • df2Denominator degrees of freedom
  • pp-value
  • var.withinWithin-group variance; equals MS.error
  • var.amongAmong group variance

See Also

repeatability

Examples

Run this code
data(WalkingStickFemurs)
aovfit <- aov(femur.length ~ 1 + Error(specimen), data = WalkingStickFemurs)
vc <- varcomps(aovfit, n = 2)
vc
R.varcomps <- repeatability(vc)
R.varcomps

Run the code above in your browser using DataLab