Created
September 2, 2017 10:54
-
-
Save conormm/8f5f3133f7232d4f88f4027aa9061fe3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fit %>% | |
filter(term != "(Intercept)") %>% | |
group_by(term) %>% | |
summarise(estimate = mean(estimate), | |
conf.low = mean(conf.low), | |
conf.high = mean(conf.high), | |
sig_0005 = ifelse(sum(sig_0005) > 6, "significant (< 0.005)", "not significant")) %>% | |
ggplot(aes(y = reorder(term, estimate), x = estimate, colour = sig_0005)) + | |
geom_point() + | |
geom_errorbarh(aes(xmax = conf.high, xmin = conf.low)) + | |
theme_minimal() + | |
geom_vline(aes(xintercept = 0), linetype = "dashed", colour = "blue") + | |
labs(title = "Linear regression estimates", | |
subtitle = "Dependent variable: IMDB score", | |
x = "Independent variable", | |
y = "estimate") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment