summarise {vcdExtra}R Documentation

Brief Summary of Model Fit for glm and loglm Models

Description

For glm objects, the print and summary methods give too much information if all one wants to see is a brief summary of model goodness of fit, and there is no easy way to display a compact comparison of model goodness of fit for a collection of models fit to the same data.

All loglm models have equivalent glm forms, but the print and summary methods give quite different results

summarise provides a brief summary for one or more glm or loglm models This implementation is experimental, and is subject to change.

Usage


summarise(object, ...)

## S3 method for class 'glm'
summarise(object, ..., test = NULL)
## S3 method for class 'glmlist'
summarise(object, ..., test = NULL, sortby=NULL)

## S3 method for class 'loglm'
summarise(object, ...)
## S3 method for class 'loglmlist'
summarise(object, ..., sortby=NULL)

Arguments

object, ...

objects of class glm, typically the result of a call to glm, or a list of objects for the glmlist method. Alternatively, objects of class loglm or a "loglmlist" object

test

Not used in the current implementation.

sortby

For glmlist and loglmlist objects, either a numeric or character string specifying the column in the result for which the rows are sorted (in decreasing order).

Value

A data frame (also of class anova) with columns c("LR Chisq", "Df", "Pr(>Chisq)", "AIC", "BIC"). Row names are taken from the names of the model object(s).

Author(s)

Michael Friendly

See Also

glmlist, loglmlist, modFit

Examples

data(Mental)
indep <- glm(Freq ~ mental+ses,
                family = poisson, data = Mental)
summarise(indep)
Cscore <- as.numeric(Mental$ses)
Rscore <- as.numeric(Mental$mental)

coleff <- glm(Freq ~ mental + ses + Rscore:ses,
                family = poisson, data = Mental)
roweff <- glm(Freq ~ mental + ses + mental:Cscore,
                family = poisson, data = Mental)
linlin <- glm(Freq ~ mental + ses + Rscore:Cscore,
                family = poisson, data = Mental)
                
# make a glmlist
mods <- glmlist(indep, coleff, roweff, linlin)
summarise(mods)

[Package vcdExtra version 0.6-8 Index]