Hi everyone,
Forgive me if I am missing something obvious, but I cannot figure out or find information regarding changing geom_point()
values in marginal_effects plots. I can freely change the other parameters.
Quick example
dat <-tibble(x = rnorm(20, mean = 2, sd = 2),y = rnorm(20, mean = 10, sd = 2))
fit1 <- brm (x ~ y, data = dat)
pme <- marginal_effects(fit1)
p1 <- plot(pme, plot = F, points = T)[[1]]
p1
change geom_line() color and size. Other usual ggplot parameters work just like geom_line in this example.
p2 <- plot(pme, plot = F, points = T)[[1]] +
geom_line(color="black", size=1)
p2
attempt to change geom_point() color and size
p3 <- plot(pme, plot = F, points = T)[[1]] +
geom_line(color="black", size=5) +
geom_point(color = "red", size = 1)
p3
another approach
p4 <- plot(pme, plot = F, points = F)[[1]] +
geom_line(color="black", size=5) +
geom_point(aes(x = x, y=y), color = "red", size = 1)
p4
I also tried geom_point(aes(data = dat, x=x, y=y))
and various other combinations
Any suggestions would be appreciated!
Again, sorry if this is just is simple user error or a lack of ggplot knowledge.
Please also provide the following information in addition to your question:
- Operating System: osx 10.14.2
- brms Version: 2.8.5