AnovaMix function

Mixed model least squares analysis of variance (mixed ANOVA).

Mixed model least squares analysis of variance (mixed ANOVA).

Uses output from lm() in mixlm package to compute ANOVA table, variance components and errors. latin1

AnovaMix(object, SStype)

Arguments

  • object: object fitted by lm (mixlm package) containing at least one random effect.
  • SStype: type of sums-of-squares (I/II/III) for Analysis of Variance.

Details

AnovaMix can either be invoked directly or through the Anova() function (with type III error).

Returns

  • lm: linear model fitted by lm in package mixlm.

  • anova: ANOVA table.

  • err.terms: list of denominator information for F tests.

  • denom.df: numeric of denominator degrees of freedom for F tests.

  • restricted: logical indicating if ANOVA used restricted modelling.

  • exp.mean.sq: character containing expected mean squares.

  • var.comps: numeric containing variance components.

  • random.effects: character containing the random effects.

  • ind.randoms: numeric with indices of random effects in the model.

  • formula.text: character containing all effects of the model.

Author(s)

Kristian Hovde Liland

Note

Only balanced models are fully supported.

See Also

print.AnovaMix, Anova, lm

Examples

mydata <- data.frame(y = rnorm(12), x = factor(c(rep(2,4),rep(1,4),rep(0,4))), z = factor(rep(c(1,0),6))) mixlm <- lm(y~x*r(z), data = mydata) Anova(mixlm,type="III")
  • Maintainer: Kristian Hovde Liland
  • License: GPL (>= 2)
  • Last published: 2025-01-14