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

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
AnovaMix(object)

Arguments

object

object fitted by lm (mixlm package) containing at least one random effect.

Details

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

Value

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.

Note

Only balanced models are fully supported.

Author(s)

Kristian Hovde Liland

See Also

print.AnovaMix, Anova, lm

Examples

1
2
3
4
5
mixlm <- lm(y~x*r(z),
			data = data.frame(y = rnorm(8),
							  x = factor(c(rep(1,4),rep(0,4))),
							  z = factor(rep(c(1,0),4))))
Anova(mixlm,type="III")

Example output

Attaching package: 'mixlm'

The following objects are masked from 'package:stats':

    glm, lm

Analysis of variance (unrestricted model)
Response: y
          Mean Sq Sum Sq Df F value Pr(>F)
x           0.419  0.419  1   0.170 0.7511
z           0.006  0.006  1   0.002 0.9699
x:z         2.464  2.464  1   2.616 0.1811
Residuals   0.942  3.768  4       -      -

            Err.term(s) Err.df VC(SS)
1 x                 (3)      1  fixed
2 z                 (3)      1 -0.615
3 x:z               (4)      4  0.761
4 Residuals           -      -  0.942
(VC = variance component)

          Expected mean squares
x          (4) + 2 (3) + 4 Q[1]
z          (4) + 2 (3) + 4 (2) 
x:z        (4) + 2 (3)         
Residuals  (4)                 

mixlm documentation built on May 2, 2019, 6:08 p.m.

Related to AnovaMix in mixlm...