[Rd] print.glm() signif digits (PR#7765)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Apr 2 09:40:09 CEST 2005


Why did you file a bug report on something with is `not wrong' and indeed 
you can change?  How does this correspond to the definition of a `bug' in 
the FAQ?

Your analysis is in fact based on an incorrect assertion:  the default is

> args(print.glm)
function (x, digits = max(3, getOption("digits") - 3), ...)

and that defaults to 4 since getOption("digits") defaults to 7.

The correct way to compare two deviances is by the anova() function, and 
the correct way to extract them is the deviance() function.  (You seems to 
have a 1960s mindset of poring over lineprinter output from a statistical 
analysis: by the 1970s and GLIM we did not do that.)

On Sat, 2 Apr 2005 prathouz at health.bsd.uchicago.edu wrote:

> Hi -- I have found that by default the function print.glm() uses 3
> significant figures when printing out null and model deviances and the
> aic.  Of course, this is not wrong.  But if a person fitted two nested
> models and compared the resulting deviances obtained from print.glm(), the
> resulting hypothesis test could indeed be wrong because of this rounding.
> The function summary() applied to a glm object gives a more precise
> printout and I think that print.glm() ought to as well by default.  Thanks
> much.  -- pr

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list