addreg (version 3.0)

anova.addreg: Analysis of Deviance for addreg Fits

Description

Compute an analysis of deviance table for more than one GLM fitted using addreg.

Usage

# S3 method for addreg
anova(object, ..., test = NULL)

Arguments

object, …

objects of class "addreg", typically the result of a call to addreg, or a list of objects for the "addreglist" method.

test

a character string, (partially) matching one of "Chisq", "LRT", "Rao", "F" or "Cp". See stat.anova.

Value

An object of class "anova" inheriting from class "data.frame".

Warning

The comparison between two or more models will only be valid if they are fitted to the same dataset. This may be a problem if there are missing values and R's default of na.action = na.omit is used, and anova will detect this with an error.

Details

Unlike anova.glm, specifying a single object is not allowed.

The table has a row for the residual 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. (This only makes statistical sense if the models are nested.) It is conventional to list the models from smallest to largest, but this is up to the user.

Models where the MLE lies on the boundary of the parameter space will be automatically removed from the list (with a warning), because asymptotic results to not apply to such models.

The table will optionally contain test statistics (and p-values) comparing the reduction in deviance for the row to the residuals. Mallows' Cp statistic is the residual deviance plus twice the estimate of \(\sigma^2\) times the residual degrees of freedom, which is closely related to AIC. You can also choose "LRT" and "Rao" for likelihood ratio tests and Rao's efficient score test. The former is synonymous with "Chisq" (although both have an asymptotic chi-square distribution).

See Also

addreg, anova.glm, anova

Examples

Run this code
# NOT RUN {
## For an example, see example(addreg)
# }

Run the code above in your browser using DataCamp Workspace