[Rd] suggested changes to summary.glm and summary.lm (PR#2776)
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Apr 28 14:29:32 MEST 2003
This is a little tricky, and the issue is with the print methods, not the
return values I believe.
I don't think we want to alter summary.lm nor summary.glm, which in
neither S nor R include aliased coefficients in the coef component (nor
the covariance nor correlation components). However, S's
print.summary.glm does expand the coef and correl matrices to include NAs
(which I noticed after starting a similar strategy). However,
print.coefmat prints NAs as empty strings, so my current version shows the
aliased coefficients as a blank row and not via NAs.
Anyone know why print.coefmat suppresses NAs?
I am about to commit a version of the print methods that
- warns of undefined coefficients
- shows them in the coef dispay as NAs
- omits them from the correlation matrix.
On Mon, 14 Apr 2003 jfox at mcmaster.ca wrote:
> Something for the wish list (not really a bug):
> I was reminded of what I see as a problem with summary.glm last week when
> some of my students fell into a trap in a homework exercise, defining a
> logit model in which coefficients were aliased. When this happens in lm,
> summary.lm prints a message ["Coefficients: (1 not defined because of
> singularities)"], but summary.glm is silent. In both instances, the print
> methods show aliased coefficients as NA.
> At minimum, I think that it would be desirable for summary.glm to indicate
> that there's a problem. In addition, I would prefer that both summary.glm
> and summary.lm include aliased coefficients (as NA) in the table of
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