Learn R Programming

robcbi (version 1.1-4)

fits.compare: Comparison of fits

Description

The fits.compare function accepts a sequence of objects of class "glm", "cubinf", or "aov" (with optional names), and creates a class "fits.compare" object. The print.fits.compare function prints summaries of each of the input objects in a manner suitable for comparing the input models.

Usage

# S3 method for fits.compare
print(x, digits = max(3, .Options$digits - 3), ...)

fits.compare(...)

Arguments

x

An object inheriting from class "fits.compare", the result of a call to fits.compare.

digits

Minimal number of significant digits.

...

In fits.compare(), ... is a sequence of objects of class "lm", "lm.robust", or "aov". Otherwise ... represents further arguments passed to or from print method.

Details

It is not recommended to compare objects with different structures.

See Also

The model fitting function glm, cubinf

Examples

Run this code
 library(robcbi)
 data(Finney)
 Vol <- Finney$Vol; Rate <- Finney$Rate; Resp <- Finney$Resp
 lVol <-log(Vol); lRate <- log(Rate)
 z.glm <- glm(Resp~lVol+lRate,family=binomial)
 z.cub <- glm(Resp~lVol+lRate,family=binomial,method="cubinf", ufact=3.2)
 comp <- fits.compare(z.glm,z.cub)
 comp

Run the code above in your browser using DataLab