[R] Strange results : bootrstrp CIs

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Sat Jan 13 21:56:56 CET 2024


В Sat, 13 Jan 2024 20:33:47 +0000 (UTC)
varin sacha via R-help <r-help using r-project.org> пишет:

> coef(lm(Score~ Time + factor(Country)),data=data[idx,])

Wrong place for the data=... argument. You meant to give it to lm(...),
but in the end it went to coef(...). Without the data=... argument, the
formula passed to lm() picks up the global variables inherited by the
func() closure.

Unfortunately, S3 methods really do have to ignore extra arguments they
don't understand if the class is to be extended, so coef.lm isn't
allowed to complain to you about it.

-- 
Best regards,
Ivan



More information about the R-help mailing list