From ripley at stats.ox.ac.uk  Mon Apr 28 14:29:32 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon Apr 28 14:29:46 2003
Subject: [Rd] suggested changes to summary.glm and summary.lm (PR#2776)
In-Reply-To: <200304141159.h3EBxQpD026575@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.44.0304281319210.30743-100000@gannet.stats>

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@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 
> coefficients.


-- 
Brian D. Ripley,                  ripley@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


[Rd] suggested changes to summary.glm and summary.lm (PR#2776)
Prof Brian Ripley