Description Usage Arguments Examples
View source: R/regression_viz.R
If you want to avoid putting yet another boring table into your report this function will display all the standard coefficient information from a model but also will allow you to visually display the coefficient results and their coefficient values, allowing easier comparisons and iterpretations of concepts like effect size. Currently it supports any model who's output can by tidied by the Broom package.
1 2 | regression_viz(model_or_models, plot_title = "", zero_line = TRUE,
only_in_common = TRUE, model_interp = "default")
|
model_or_models |
Either a single fit or a list of fits. If the list of fits is named then those names are used in plotting. Otheriwse they are just stated as "model 1", ... |
plot_title |
Main title for the plot. |
zero_line |
A line at zero on the x-axis. Used to determine statistical significance (if confidence interval overlaps line, coefficient is significant). |
only_in_common |
If TRUE will only plot the coefficients that appear in all of your models (although for fair comparisons all models should have all coefficients). |
model_interp |
A sibtitle for the plot that explains how to interpret the results contained in a statistically sound way. Default works for a standard linear regression. |
... |
A model fit or fits to be plotted. |
1 2 3 | my_models <- list(model_1,model_2,model_3)
names(my_models) <- c("No Interaction", "Wrong Interaction", "Right Interaction")
regression_viz(my_models, plot_title = "Comparing Beta estimates"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.