View source: R/bcat_plt_diag.R
| bcat_plt_diag | R Documentation |
Produce a multi-panel diagnostic plot for a fitted model with UC styling. Optionally prints assumption test results (Breusch-Pagan, Shapiro-Wilk, Durbin-Watson) to the console.
bcat_plt_diag(
model,
which = c(1, 2, 3, 4),
labels = TRUE,
n_labels = 3,
tests = TRUE,
nrow = NULL,
ncol = NULL
)
model |
A fitted model object (e.g., |
which |
Integer vector specifying which panels to include:
1 = Residuals vs Fitted, 2 = Q-Q Plot, 3 = Scale-Location,
4 = Residuals vs Leverage. Default: |
labels |
Logical. Label influential observations? Default is TRUE. |
n_labels |
Integer. Number of extreme observations to label. Default is 3. |
tests |
Logical. Print assumption test results to console? Default is TRUE. |
nrow |
Number of panel rows. |
ncol |
Number of panel columns. |
A patchwork object combining the diagnostic panels.
Saannidhya Rawat
Other plots:
bcat_plt_area(),
bcat_plt_bar(),
bcat_plt_box(),
bcat_plt_coef(),
bcat_plt_hist(),
bcat_plt_line(),
bcat_plt_point(),
bcat_plt_ts()
m <- lm(mpg ~ wt + hp + cyl, data = mtcars)
bcat_plt_diag(m)
bcat_plt_diag(m, which = c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.