Reputation: 984
I have a lmer model and want to plot the effect trend with the point data, but the function plot_model(), although is great at plotting what I want, seems very unflexible in terms of customization.
I want to change the colours and alpha of the points in the following plot:
model1<-lmer(NDVI~ fall_ai+spring_ai+SI+(1|colony),data=clm,REML=T)
plot_model(model1, type = "pred", show.data = T)
As well as change the CI lines from alpha colour to dashed lines, like the example below:
Upvotes: 0
Views: 3315
Reputation: 984
A workaround can be using lattice to do it:
plot(Effect(c("fall_ai"),model1),
colors="black",lwd=1.5,ylab="Spring NDVI",xlab="Autumn Aridity Index",
ci.style="lines",main="",ylim=c(0.20,0.55),xlim=c(0,45))
trellis.focus("panel", 1, 1, highlight = FALSE)
print(panel.points(clm$fall_ai,pch = 16, cex = 0.7, col = "black"))
trellis.unfocus()
Upvotes: 0