Learn R Programming

mixlm (version 1.0.8.1)

Anova.lmm: Analysis of variance with SS type II or III (including mixed models).

Description

Replacement for Anova.lm in package car. This version adds support for random effects when needed.

Usage

## S3 method for class 'lmm':
Anova(mod, error, type = c("II", "III", 2, 3), white.adjust
 = c(FALSE, TRUE, "hc3", "hc0", "hc1", "hc2", "hc4"),
 vcov. = NULL, singular.ok, ...)

Arguments

mod
lm, aov, glm, multinom, polr mlm, coxph, lme, mer, svyglm or other suitable model object.
error
for a linear model, an lm model object from which the error sum of squares and degrees of freedom are to be calculated. For F-tests for a generalized linear model, a glm object from which the dispersion is to be e
type
type of test, "II", "III", 2, or 3.
vcov.
in the default method, an optional coefficient-covariance matrix or function to compute a covariance matrix, computed by default by applying the generic vcov function to the model object. A similar argument may be supp
singular.ok
defaults to TRUE for type-II tests, and FALSE for type-III tests (where the tests for models with aliased coefficients will not be straightforwardly interpretable); if FALSE, a model with aliased coef
white.adjust
if not FALSE, the default, tests use a heteroscedasticity-corrected coefficient covariance matrix; the various values of the argument specify different corrections. See the documentation for h
...
do not use.

Value

  • Returns appropriate analysis of variance or halts if unsupported input is detected.

encoding

latin1

See Also

print.AnovaMix, AnovaMix, lm

Examples

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

Run the code above in your browser using DataLab