Re: [Rd] request for patch in drop1 (add.R)

2011-02-24 Thread Martin Maechler
Ben Bolker bbol...@gmail.com on Wed, 23 Feb 2011 19:36:43 -0500 writes: On 11-02-23 06:12 PM, Prof Brian Ripley wrote: residuals() and $residuals are often very different: residuals() is generic, but even the default method is *not* simple extraction. Their values can be

[Rd] request for patch in drop1 (add.R)

2011-02-23 Thread Ben Bolker
By changing three lines in drop1 from access based on $ to access based on standard accessor methods (terms() and residuals()), it becomes *much* easier to extend drop1 to work with other model types. The use of $ rather than accessors in this context seems to be an oversight rather than a

Re: [Rd] request for patch in drop1 (add.R)

2011-02-23 Thread Martin Maechler
Ben Bolker bbol...@gmail.com on Wed, 23 Feb 2011 09:14:37 -0500 writes: By changing three lines in drop1 from access based on $ to access based on standard accessor methods (terms() and residuals()), it becomes *much* easier to extend drop1 to work with other model

Re: [Rd] request for patch in drop1 (add.R)

2011-02-23 Thread Ben Bolker
On 11-02-23 03:20 PM, Martin Maechler wrote: Ben Bolker bbol...@gmail.com on Wed, 23 Feb 2011 09:14:37 -0500 writes: By changing three lines in drop1 from access based on $ to access based on standard accessor methods (terms() and residuals()), it becomes *much* easier

Re: [Rd] request for patch in drop1 (add.R)

2011-02-23 Thread peter dalgaard
On Feb 23, 2011, at 21:38 , Ben Bolker wrote: Potentially, but I am personally much more interested in enabling drop1(), which seems to be a much more legitimate tool for testing terms in models than step(), which is so easy to abuse ... Yes, although repeated use of drop1() easily leads

Re: [Rd] request for patch in drop1 (add.R)

2011-02-23 Thread Prof Brian Ripley
residuals() and $residuals are often very different: residuals() is generic, but even the default method is *not* simple extraction. Their values can be of different lengths: think about an lm fit with na.action = na.exclude. That is precisely the sort of thing the tests in add.R were

Re: [Rd] request for patch in drop1 (add.R)

2011-02-23 Thread Ben Bolker
On 11-02-23 06:12 PM, Prof Brian Ripley wrote: residuals() and $residuals are often very different: residuals() is generic, but even the default method is *not* simple extraction. Their values can be of different lengths: think about an lm fit with na.action = na.exclude. That is precisely