lm-residuals and NA {was [R] Can't understand error message :-{}

Z. Todd Taylor Todd.Taylor at pnl.gov
Fri Mar 5 16:34:12 CET 1999

Martin Maechler <maechler at stat.math.ethz.ch> wrote:

> Werner Stahel (in our stat group) has been using hacked versions of  lm
> and some hacked lm methods which exactly address this,
> i.e. they follow the "b)"  approach;  however I think that it's still a
> hack that only works in some (most used) cases.
> One would have to change quite a few  lm/glm/... methods probably.
> I do think it'd be a worthwhile route, though incompatible with S.
> Would one want to have a global option() to toggle this behavior?
> It looks dangerous and undesirable (a la octave ..) to have functions
> return different results depending on options().
> The "contrasts" case is a half step in that direction, and it has had all
> kind of adverse consequences.  
> Ideally, options() should only affect the way results are *displayed*, 
> not the way they are computed (and stored). 
> Other opinions?

Returning a result parallel to the inputs has always seemed like
a no-brainer to me.  IIRC, it didn't work in the Old-S 'reg'
functions, but the New-S 'lsfit' function added that behavior.
Then August92-S (isn't that what we called it?) inexplicably
broke it again in all the new object-oriented modeling

I agree that options() is the wrong place to specify this sort
of thing.  Couldn't the desired behavior could be obtained by
adding a "na.fill" argument to each modeling method (defaulted
to FALSE for S compatibility)?

Now, should the NAs also be inserted into the model.frame?

Z. Todd Taylor
Pacific Northwest National Laboratory
Todd.Taylor at pnl.gov
Why are they called 'standard options'?
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list