[R] How to extend an existing linear mixed effects model using lme in R?

Bert Gunter bgunter.4567 at gmail.com
Wed Mar 23 15:46:43 CET 2016


You should post this on the mixed models list instead of here:

https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Mar 22, 2016 at 2:36 PM, urs <urs at kleinholdermann.de> wrote:
> Dear list,
>
> I fitted a linear mixed effects model using lme in R on a relatively large
> data set. Now I want to extend this model, introducing an additional fixed
> effect on a subset of the data without altering coefficients estimated on
> the original dataset. I.e.
>
> original model for example:
> m1 = lme(y~a+b,random=~1|id,data=D)
>
> now I want to do something similiar to
> m2 = update(m1,~.+c,data=d)
>
> Where d is a subset of D. The values of the new predictor c are only
> available for this subset. However, I would like to keep the originally
> estimated coefficients of the model m1 with regard to predictors a and b. If
> I use update as described above coefficients for all predictors (a,b,c) are
> estimated again on the smaller dataset d. Any suggestions on how I can
> estimate the effect of c while keeping the old coefficient values for a and
> b? Or is this for some reason a bad idea altogether?
>
> Urs
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list