Re: [Rd] model.matrix() may be misleading for "lme" models

2024-09-23 Thread Ben Bolker
> I can't tell whether evaluating object$call$data in environment(object$formula) is a better or worse idea than parent.frame(). I have struggled with this a lot over the years. There is a bunch of wonky code in lme4, e.g. here , that t

Re: [Rd] model.matrix() may be misleading for "lme" models

2024-09-23 Thread John Fox
Thank you Ivan and Ben for your recent further comments. I think that the current code for the unregistered model.matrix.lme() in the development version of the car package is pretty robust and certainly an improvement over what was there before (which returned incorrect results for non-defaul

Re: [Rd] model.matrix() may be misleading for "lme" models

2024-09-23 Thread Ivan Krylov via R-devel
В Sun, 22 Sep 2024 10:23:50 -0400 John Fox пишет: > > Evaluating object$call$data in the environment of the suggested > > nlme:::model.matrix.lme function may also not work right. Without an > > explicit copy of the data, the best environment to evaluate it in > > would be parent.frame(). > >