Description Usage Arguments Value See Also Examples
Plot histograms and Q-Q plots of model residuals to assess residual normality.
1 2 3 4 | resid_hist_qq(model, plot_type = "both", resid_type = "std", bins = 9,
qqline = TRUE, htitle = "Histogram", qtitle = "Normal Q-Q Plot",
subtitle = TRUE, hxlab = "Residuals", qxlab = "Theoretical Quantiles",
hylab = "Count", qylab = "Sample Quantiles", ...)
|
model |
An |
plot_type |
A string indicating which type of plot to produce. The
default |
resid_type |
A string indicating which type of residuals to use. The
default |
bins |
How many bins to use for the histograms. |
qqline |
A logical indicating whether to include a qqline on the Q-Q plots. |
htitle |
A string indicating what to title the histograms. |
qtitle |
A string indicating what to title the Q-Q plots. |
hxlab |
A string indicating what to title the histogram x-axes. |
qxlab |
A string indicating what to title the Q-Q plot x-axes. |
hylab |
A string indicating what to title the histogram y-axes. |
qylab |
A string indicating what to title the Q-Q plot y-axes. |
... |
Additional arguments passed to
|
subittle |
A logical indicating whether to include the default subtitles. |
If single plot_
and resid_
type
s are specified
(i.e., a single histogram or Q-Q plot is requested), a ggplot2 plot object
is returned. If more than one plot is requested, a call to
gridExtra::grid.arrange
draws on the current
device and a gtable is returned.
resid_fitted_plot
for residual vs. fitted values
plots.
1 2 3 4 | mtcars_lm <- lm(mpg ~ wt, mtcars)
resid_hist_qq(mtcars_lm)
resid_hist_qq(mtcars_lm, plot_type = "qq", resid_type = "unstd")
resid_hist_qq(mtcars_lm, resid_type = "both")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.