| ggcoef {GGally} | R Documentation |
Plot the coefficients of a model with broom and ggplot2.
ggcoef(x, mapping = aes_string(y = "term", x = "estimate"), conf.int = TRUE, conf.level = 0.95, exponentiate = FALSE, exclude_intercept = FALSE, vline = TRUE, vline_intercept = "auto", vline_color = "gray50", vline_linetype = "dotted", vline_size = 1, errorbar_color = "gray25", errorbar_height = 0, errorbar_linetype = "solid", errorbar_size = 0.5, ...)
x |
a model object to be tidied with |
mapping |
default aesthetic mapping |
conf.int |
display confidence intervals as error bars? |
conf.level |
level of confidence intervals (passed to |
exponentiate |
if |
exclude_intercept |
should the intercept be excluded from the plot? |
vline |
print a vertical line? |
vline_intercept |
|
vline_color |
color of the vertical line |
vline_linetype |
line type of the vertical line |
vline_size |
size of the vertical line |
errorbar_color |
color of the error bars |
errorbar_height |
height of the error bars |
errorbar_linetype |
line type of the error bars |
errorbar_size |
size of the error bars |
... |
additional arguments sent to |
library(broom) reg <- lm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, data = iris) ggcoef(reg) d <- as.data.frame(Titanic) reg2 <- glm(Survived ~ Sex + Age + Class, family = binomial, data = d, weights = d$Freq) ggcoef(reg2, exponentiate = TRUE) ggcoef(reg2, exponentiate = TRUE, exclude_intercept = TRUE, errorbar_height = .2, color = "blue")