Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plotting method for estimate_means objects #225

Open
IndrajeetPatil opened this issue Jun 25, 2022 · 0 comments
Open

Add plotting method for estimate_means objects #225

IndrajeetPatil opened this issue Jun 25, 2022 · 0 comments
Labels
Enhancement 💥 New feature or request

Comments

@IndrajeetPatil
Copy link
Member

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)

image

@IndrajeetPatil IndrajeetPatil added the Enhancement 💥 New feature or request label Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💥 New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant