I am trying to run diagnostic plots on an lmer
model but keep hitting a wall. I'm not sure how much information I need to provide here, but here goes:
The model is simple:
best <- lmer(MSV_mm ~ Size_treat + (1|Rep) + (1|Patch) + (1|Trap), data= early_nopine).
MSV_mm
is numeric (snout-vent lengths) and Size_treat
is a factor with 4 levels: Continuous, Large, Medium and Small. Rep
, Patch
and Trap
are random effects.
When I run plot(best)
, I get the following error message:
"Error in as.double(y) :
cannot coerce type 'S4' to vector of type 'double'"
I assume this is related to the lmer
function. I have trolled the web and have not yet found an answer to this problem. Is it an lmer
thing?