Skip to content
Prev 75457 / 398502 Next

as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)

This is a continuing issue with the one on the list a long time ago (I 
couldn't find a solution to it from the web):
--------------------------------------------------------------------------
Thanks for the detailed report.  I can reproduce the problem.  It
appears that there needs to be an eval early in the lme function so it
stores the formula for the fixed effects, not the name of the formula.
------------------------------------------------------------------------
Now I follow the suggestion and use :
demo.lm2<-lme(eval(fma),data=demo,random=~1|subj) 
#works ok, even with summary(demo.lm2) 
#predict(demo.lm2,newframe,level=0) 
#Error in eval() : Argument "expr" is missing, with no default

How can I fix this problem and get the predict() function to work?
Thank you!

********************************************************************
Song Liu
School of Statistics
313 FordH
224 Church St. SE
Minneapolis,MN 55455