All, I've solved part of the problem below by making sure that the formula in the grouped data object is the same as the formula specified within lme (this isn't the case in the cited example from Pinheiro & Bates). However, augPred seems to plot only a linear model instead of the polynomial model. Does anyone know how to make sure that augPred plots the same model as that specified in the model (as below)? cheers, dave
________________________________ From: Afshartous, David Sent: Thursday, September 07, 2006 6:18 PM To: r-help@stat.math.ethz.ch Cc: Afshartous, David Subject: augPred plot in nlme library All, I'm trying to create an augPred plot in the nlme library, similar to the plot on p.43 of Pinheiro & Bates (Mixed Effects Models in S and S-Plus) for their Pixel data. My data structure is the same as the example but I still get the error msg below. > comp.adj.UKV <- groupedData(adj.UKV ~ Time | Patient_no/Lisinopril, data = comp.adj.UKV.frm, order.groups = F) > fm1comp = lme(adj.UKV ~ Time + Time.sq, data = comp.adj.UKV, random = list(Patient_no = ~ 1) ) > plot(augPred(fm1comp, level= 1)) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ I've checked all the variale lengths, and have also made sure that factors are correctly defined as factors. Is there anything special I need to be doing for augPred to work correctly? I checked the help but didn't find much. cheers, dave David Afshartous, PhD University of Miami School of Business Rm KE-408 Coral Gables, FL 33124 [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch 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.