[R-sig-ME] Matrix of predicted values using lme or lmer

Matthew Smith mts002 at uark.edu
Sat Jun 23 03:37:30 CEST 2012


I am currently trying to used a mixed model to perform a Procrustes  
Trajectory analysis on some shape data. I have 17 relative warps  
scores as my dependent matrix accompanied by individual, treatment,  
size, and day. Shape data was collected at 3 separate time points for  
each individual, so this is a repeated measures design. Since I do not  
want to analyze each relative warp separate, I have chosen to use  
individual as a random effect along with my fixed effects.

The procedure calls for a residual randomization, in which residual  
values from a reduced model are added to the predicted values of the  
full model.

The origin code use the lm function, but since I wanted to add random  
effects, I am using lme. My problem lies in when I attempt to get a  
matrix of predicted values rows=# of obs, cols=17 (each RW), it does  
not match up.

I read several discussion forums online and other threads, but I  
cannot seem to come up with a clear answer. Is there a predict command  
for the lme function that will take into account both the fixed and  
random effects? If not, is there one that just takes into account the  
fixed effects?

I appreciate any insight someone can provide me.

Matthew Smith
PhD Candidate
Department of Biological Sciences
1 University of Arkansas
Science Engineering Building
Fayetteville, AR 72701-1201
479-575-2963
mts002 at uark.edu



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