[Rd] For wishlist: sanity checks for subsets in lm, glm (PR#

Martyn Plummer plummer@iarc.fr
Wed, 12 Apr 2000 12:55:55 +0200 (CEST)

On 12-Apr-00 Peter Dalgaard BSA wrote:
> Might be a good idea. Mind you, Splus 3.4 does exatly the same thing,
> and I'm a little worried that the uniqueness assumption might kill
> some bootstrapping applications:
>  glm(y ~ x, data=test.data, subset=sample(seq(along=y),replace=T))

Splus 5.1 doesn't do this, because it preserves logical vectors in
data frames (but then perhaps comparisons with S4 or SPlus 5.x are

I knew there would be a good reason not to implement this. My feeling
is that high level modelling functions should protect the  user as
much as possible. If you want more flexibility, you can always
program around it.

   temp.data <- test.data[sample(seq(along=y), replace=T),]
   glm(y ~x, data=temp.data)

This doesn't help with breaking existing code though.

r-devel 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-devel-request@stat.math.ethz.ch