Hi folks, I am having trouble to plot a mixed model analysis of covariance (ANCOVA). To do so I use the function predict in nlme but the line that is being drawn is totally out of control!!! here is my script (where MASS_S is dry mass and MASS_F is fresh mass):
MEN<-read.table("Mentha_lme2.txt", h=T) attach(MEN) lme1<-lme(log(MASS_S)~log(MASS_F)*TREAT, random=~1|INDIV) summary(lme1) anova.lme(lme1) plot(log(MASS_F), log(MASS_S), type="n") points((log(MASS_F)[TREAT=="A"]), (log(MASS_S)[TREAT=="A"]), pch=16, col=1) points((log(MASS_F)[TREAT=="B"]), (log(MASS_S)[TREAT=="B"])) lines(log(MASS_F)[TREAT=="A"], predict(lme1)[TREAT=="A"]) lines(log(MASS_F)[TREAT=="B"], predict(lme1)[TREAT=="B"], lty=3) Instead of drawing a nice line through my points, a big mess comes out on my plot... Is it because the function predict works differently with nlme or can it come from an other problem??? Please help!!! thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/predict-nlme-tp3386760p3386760.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.