[R] How to extend an existing linear mixed effects model using lme in R?
urs
urs at kleinholdermann.de
Tue Mar 22 22:36:54 CET 2016
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
More information about the R-help
mailing list