| tinyplot.parameters_model | R Documentation |
tinyplotDraws a forest plot (coefficients as points, confidence
intervals as ranges) from a parameters_model object, using the
lightweight base-graphics package tinyplot instead of ggplot2. The
method is registered for tinyplot::tinyplot() and its shorthand alias
tinyplot::plt().
## S3 method for class 'parameters_model'
tinyplot(
x,
flip = TRUE,
zero = TRUE,
sort = FALSE,
size_title = NULL,
size_axis_title = NULL,
size_axis_text = NULL,
size_point = NULL,
size_line = NULL,
...
)
x |
An object returned by |
flip |
Logical, if |
zero |
Logical, if |
sort |
Logical, if |
size_title, size_axis_title, size_axis_text |
Numeric, set the size of
plot title, axis title or axis labels. If not |
size_point, size_line |
Size of points and lines in the plot. Default is
|
... |
Other arguments passed to |
Random effects parameters are dropped from the plot, and for models with a zero-inflation component, only the conditional (count) component is shown. A message is printed in these cases.
This method requires tinyplot version 0.7.0 or later, which supports extending axis limits to cover the reference value.
The input x, invisibly. The function is called for its side
effect of drawing a plot.
The plot method for parameters_model objects, provided by the
see package, for ggplot2 based plots.
library(tinyplot)
data(mtcars)
model <- lm(mpg ~ wt + cyl + gear, data = mtcars)
result <- model_parameters(model)
plt(result)
# sorted by coefficient size, using a theme
plt(result, sort = TRUE, theme = "classic")
# exponentiated coefficients place the reference line at 1
model <- glm(am ~ wt + hp, data = mtcars, family = "binomial")
result <- model_parameters(model, exponentiate = TRUE)
plt(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.