[R-sig-ME] A question

sheida sarafzade shsarafzade at gmail.com
Wed Feb 8 17:13:23 CET 2012


Hello
I'm MSc. student in biostatistics and working on mixed effect models
I’m trying to add fitted line to scatter plot (x,y)
Here “weight” is dependent variable and “month” is time variable.
The program is:
Lme1<-Lme(weight~month+(month^2),data=DataSetName,random=~month|id)

When I use the code below:
Lines(month[order(month)],fitted.lme(lme1,level=0)[order(month)])

It draws a smooth line but when I add a covariate (like birth weight)
to my model as below:

Lme2<-lme(weight~BirthWeight+month+(month^2),data=DataSetName,random=~month|id)

And then write the code below:
Lines(month[order(month)],fitted.lme(lme2,level=0)[order(month)])

It doesn’t draw smooth line. the line is not smooth.

How can I fix this problem?
What is the role of term “level” in this code? And what are it’s option?

for more information please see attachment
Thanks a lot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: question.pdf
Type: application/pdf
Size: 8814 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20120208/1fd098e1/attachment-0001.pdf>


More information about the R-sig-mixed-models mailing list