I am using a lot of plots made with the effects package.
By reading the vignette, I do find a lot of ways to customize the plots, including multiline = TRUE.
However, nothing is mentioned about how to get rid of the lines connecting levels of a categorical variable that are displayed here:
I do not understand why they are here in the first place actually. I have also tried to plot with the following code:
p <- predictorEffects(M1)
plot(p, PexCP$treatment,
main=paste(effect, "effect plot"),
symbols=TRUE, lines=FALSE)
which fails
Error in x[[selection]] : recursive indexing failed at level 3
From the vignette,data and code:
library(effects)
library(car)
Prestige$type <- factor(Prestige$type, levels=c("bc", "wc", "prof"))
lm1 <- lm(prestige ~ education + poly(women, 2) + + log(income)*type, data=Prestige)
e3.lm1 <- predictorEffect("type", lm1)
plot(e3.lm1, lines = list(multiline = FALSE))
