plot_coefs1 | R Documentation |
plot_coefs1(
...,
ci_level = 0.95,
inner_ci_level = NULL,
model.names = NULL,
coefs = NULL,
omit.coefs = c("(Intercept)", "Intercept"),
colors = "CUD Bright",
plot.distributions = FALSE,
rescale.distributions = FALSE,
exp = FALSE,
point.shape = TRUE,
point.size = 3,
legend.title = "Model",
groups = NULL,
facet.rows = NULL,
facet.cols = NULL,
facet.label.pos = "top",
color.class = colors,
resp = NULL,
dpar = NULL
)
See ?jtools::plot_coefs
This is a slight edition of the plot_coefs function in the package jtools. It only changes styling parameters.
A ggplot object.
If you encounter an error along the lines of not having the same number of attributes than elements and you are plotting categorical variables, remember to specify the variable + category name in the coefs argument. For example: you must specify c("Speciessetosa", "Speciesversicolor", "Speciesvirginica") (well, minus the reference one) and NOT only "Species".
This *feature* is present in the original function in the jtools package.
Valeria Rolle
mtcars$cyl <- as.character(mtcars$cyl)
mtcars$cat2 <- c(rep("primera", 16), rep("segunda", 16))
m1 <- glm(vs ~ carb + gear, data = mtcars, family = "binomial")
m2 <- glm(vs ~ cyl + drat + hp , data = mtcars, family = "binomial")
m3 <- glm(vs ~ cyl, data= mtcars, family = "binomial")
plot_coefs1(m3,m2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.