Plots Modeler
This document describes how to plot marginal effects of various regression models, using the plotmodel function. Plotmodel is a generic plot-function, which accepts many model-objects, like lm, glm, lme, lmerMod etc. Plotmodel allows to create various plot tyes, which can be defined via the type -argument. This document describes how to plot estimates as forest plots (or dot whisker plots) of various regression models, using the plotmodel function. Plotmodel is a generic plot-function, which accepts many model-objects, like lm, glm, lme, lmerMod etc. If the model includes a variable called “Weekend,” then the predicted vs. Actual plot might look like this (r-squared of 0.974): The model makes far more accurate predictions because it’s able to take into account whether a day of the week is a weekday or not.
Type of plot. There are three groups of plot-types:
Coefficients (related vignette)
type = 'est'
Forest-plot of estimates. If the fitted model only contains one predictor, slope-line is plotted.
type = 're'
For mixed effects models, plots the random effects.
type = 'std'
Forest-plot of standardized beta values.
type = 'std2'
Forest-plot of standardized beta values, however, standardization is done by dividing by two sd (see 'Details').
Marginal Effects (related vignette)
type = 'pred'
Predicted values (marginal effects) for specific model terms. See ggpredict
for details.
type = 'eff'
Similar to type = 'pred'
, however, discrete predictors are held constant at their proportions (not reference level). See ggeffect
for details.
type = 'int'
Marginal effects of interaction terms in model
.
Plots Modeler Jobs
Model diagnostics
type = 'slope'
Slope of coefficients for each single predictor, against the response (linear relationship between each model term and response).
type = 'resid'
Slope of coefficients for each single predictor, against the residuals (linear relationship between each model term and residuals).
Plots Modeler Images
type = 'diag'
Plots Modeler Minecraft
Check model assumptions.
Note: For mixed models, the diagnostic plots like linear relationship or check for Homoscedasticity, do not take the uncertainty of random effects into account, but is only based on the fixed effects part of the model.