[R] Strange message when plot function used..

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Apr 6 18:17:10 CEST 2008



Cristian Carranza wrote:
> Hi!
>  
> I am an R beginer, so perhaps this is a quite simple question...
> After using the lmer command (under the lme4 package) for fitting a mixed model, it was impossible to use de command plot(model) for checking model adequacy. R returns this message: "Error in as.double(y) : cannot type '%s' coerce to vector".

Because lme4 does not ship a plot method for th lmer class and 
plot.default cannot handle the object ...


> Could anyone be so kind to tell me what to do?

Think about how your plot should look like and implement it yourself.


> How can I continue to use lme library 
> instead of lmer? R does not recognize lme anymore.
> Thanks in advance!

What is "lme library"? If you mean the function lme() from package 
"nlme", you have to load "nlme" rather than "lme4".

Uwe Ligges




  _________________________________________________________________
> Confira vídeos com notícias do NY Times, gols direto do Lance, videocas[[elided Hotmail spam]]
> 
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list