Skip to content

weights in glm (PR#8720)

3 messages · Brian Ripley, Peter Dalgaard, Ben Bolker

#
First, R-bugs is not for asking questions, only for reporting things you 
are *certain* are bugs: see the R FAQ.

Why are you using weights to omit cases?  If you had used subset, this 
would have worked.  The problem is the use of zero weights, which are not 
intended to be used in this way.  We can fix this up, but it is not the 
correct way to use glm.
On Tue, 28 Mar 2006, robert.pusz at wp.pl wrote:

            

  
    
#
ripley at stats.ox.ac.uk writes:
I'm not even sure we want to fix this up. I recall some nasty issues
with DF that have no proper solution that way - an observation with a
tiny weight represents an observation with a large variance and
contributes 1DF to the residual, with weight zero it is not supposed
to contribute at all, so there's a discontinuity for weights
approaching zero.

  
    
#
Peter Dalgaard <p.dalgaard <at> biostat.ku.dk> writes:
with respect: is it worth adding a note to the documentation
and/or a warning to the code?  I understand that it
becomes unwieldy to warn/protect against all
"stupid"/unforeseen/suboptimal uses of the software, but I also 
understand how the original poster could have decided that setting
a weight to zero was a plausible way to ignore cases ... there is 
already a warning that "observations with zero weight not used for
calculating dispersion" -- could one modify this
slightly to warn people against using zero weights?  (Are zero
weights always a bad idea?)

   Ben Bolker