see
see copied to clipboard
Add plotting method for `estimate_means` objects
before
model <- lm(Sepal.Width ~ Species, data = iris)
means <- estimate_means(model)
ggplot(iris, aes(x = Species, y = Sepal.Width)) +
# Add base data
geom_violin(aes(fill = Species), color = "white") +
geom_jitter2(width = 0.05, alpha = 0.5) +
# Add pointrange and line from means
geom_line(data = means, aes(y = Mean, group = 1), size = 1) +
geom_pointrange(
data = means,
aes(y = Mean, ymin = CI_low, ymax = CI_high),
size = 1,
color = "white"
) +
# Improve colors
scale_fill_material() +
theme_modern()
after
model <- lm(Sepal.Width ~ Species, data = iris)
means <- estimate_means(model)
plot(mean)
desired output (approximate)
