Z. Todd Taylor
1999-Mar-05 15:34 UTC
lm-residuals and NA {was [R] Can't understand error message :-{}
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 functions. 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? --Todd -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._