I did a mixed model with lme, with two random factor F1 (6 levels) and F2 (4 levels).
MiModel<-lme(iv~d1+d1_id,list(Fact1=~1+d1,
Fact2=~-1+d1),
data=MiData,method="REML")
I would like to plot the residual versus predicted values, in some different figures, one for each one of the F2 levels.
I tried this:
plot(Model,resid(.)~fitted(.)|factor(F1)+factor(F2))
However I get a large figure with 6 x 4 plots.
Is it possible to do something simmilar but splitting the figure in 4 diferent plots, one for each F2 level?
Thanks in advance.
plot(Model,resid(.)~fitted(.)|factor(F2))
? – Ben Bolker