Open bwiernik opened 2 years ago
for means violins do work asshowninthedocs ^^:
m <- modelbased::estimate_means(lm(mpg ~ am, data = dplyr::mutate(mtcars, am = as.factor(am))))
#> We selected `at = c("am")`.
plot(m, show_data = c("violin", "boxplot", "jitter"))
plot(m, show_data = c("violin", "jitter"),
violin = list(aes = list(fill = "am")))
Created on 2021-09-09 by the reprex package (v2.0.1)
We don't support half violins though, but it can easily be added by adding its support to see::geom_from_list()
. But then again, my thought is that default plotting is just that; default plotting for quick and convenient explorations. If people want better plots for publications and all, they should make them because we cannot cater for all preferences (and this is why we also can provide the RECIPE of the ggplot so that people can reproduce the plot and then tweak it to their wildest desires 💪).
Then about prediction intervals, if emmeans
supports it then we do too via the kwargs, the question is wether to eventually expose the argument? If you meat by that tweaking only the dist
aesthetic of ggdist::stat_dist_halfeye
, then it falls back to supporting ggdist' geoms in see::geom_from_list()
Didn't we write a whole function of getting prediction intervals?
yes for estimate_predicted that works, but estimate_means relies on emmeans
The solution here might be to resolve #145
There is a way to do this in emmeans, I think
I'd like to be able to make this plot, visualizing a discrete predictor, with estimated group means and prediction intervals. I'd also like to include densities.
Created on 2021-09-08 by the reprex package (v2.0.1)
To accomplish this, we would need two changes: