Description Usage Arguments Details Value See Also Examples
View source: R/plot_gam_check.R
Residual plots etc.
1 2 3 4 5 6 7 | plot_gam_check(
model,
single_page = TRUE,
type = "deviance",
scatter = FALSE,
kcheck = FALSE
)
|
model |
The mgcv gam model |
single_page |
Plot all on a single page. Requires grid.arrange |
type |
The type of residuals wanted. Usually one of "deviance", "pearson","scaled.pearson", "working", or "response"., See residuals.gam. |
scatter |
Whether to plot fitted vs. observed target variable as scatter plot or density. Default is FALSE (density). |
kcheck |
If you want the slightly less verbose basis dimension (k) checking results. Default is FALSE. When true, only uses the defaults of gam.check. If you need to do more, use mgcv. |
Just a single page version of gam.check.
A ggplot that provides visual inspection of residuals and more.
gam.check
Other model visualization:
plot_coefficients.brmsfit()
,
plot_coefficients.lm()
,
plot_coefficients.merMod()
,
plot_coefficients()
,
plot_gam_2d()
,
plot_gam_3d()
,
plot_gam()
1 2 3 4 5 6 7 8 | library(mgcv); library(visibly)
d <- gamSim(1, n = 400)
g_fit <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = d)
plot_gam_check(g_fit)
plot_gam_check(g_fit, scatter=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.