Compute an analysis of deviance table for two or more aster model
fits with or without random effects.
Usage
## S3 method for class 'asterOrReaster'
anova(object, ...,
tolerance = .Machine$double.eps ^ 0.75)
anovaAsterOrReasterList(objectlist, tolerance = .Machine$double.eps ^ 0.75)
Arguments
object, ...
objects of class "asterOrReaster", typically
the result of a call to aster or reaster,
or a list of objects of class "asterOrReaster".
objectlist
list of objects of class "asterOrReaster".
tolerance
tolerance for comparing nesting of model matrices.
Details
Constructs a table having a row for the
degrees of freedom and deviance for each model.
For all but the first model, the change in degrees of freedom and
deviance is also given, as is the corresponding asymptotic P value.
For objects of class "reaster", the
quantity called deviance is only approximate. See references on
help for reaster.
When objects of class "reaster" are among those supplied,
degrees of freedom for fixed effects and degrees of freedom for
variance components are reported separately, because tests for fixed
effects are effectively two-tailed and tests for variance components
are effectively one-tailed.
In case models being compared differ by one variance component, the
reference distribution is half a chi-square with the fixed effect
degrees of freedom (difference of number of fixed effects in the two
models) and half a chi-square with one more degrees of freedom.
In case models being compared differ by two or more variance components,
we do not know how to how to do the test. The reference distribution is
a mixture of chi-squares but the mixing weights are difficult to calculate.
An error is given in this case.
Value
An object of class "anova" inheriting from class "data.frame".
Warning
The comparison between two or more models by anova or
anova.reasterlist will only be valid if they
are (1) fitted to the same dataset,
(2) models are nested,
(3) have the same
dependence graph and exponential families.
Some of this is currently checked. Some warnings are given.