I have used LME to fit a mixed effects model on my data. The data has 274 subjects with 1 to 6 observations per subject. Time is not linearly associated with the outcome, so I used ns to fit a natural cubic spline with 3 auto knots. Subject and the natural cubic time of spline are both treated as random effects. This model has run without any problem, but now I would like to plot trajectories for subjects using their fitted random effects and incorporating the shape of the natural cubic spline. I am able to plot a point for each subject's fitted random effect score at the time the outcome was measured (fitLME$fitted[,2]). However, I cannot figure out how to connect the points to reflect the natural cubic spline.
Does anyone know how to do this using output produced in the LME model object (e.g., fixed or random model coefficients) ? Code: fitLME<-lme(Y~ns(time, df=4), random=list(id = pdDiag(form = ~ ns(time, df=4, data=data) Angie Mae Rodday, MS The Health Institute Tufts Medical Center 800 Washington St, #345 Boston, MA 02111 phone: 617-636-7193 fax: 617-636-8351 email: arod...@tuftsmedicalcenter.org The information in this e-mail is intended only for the ...{{dropped:7}} ______________________________________________ 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.