View source: R/plot_residuals_diagnostics.R
| plot_residuals_diagnostics | R Documentation |
Plots normality and autocorrelation tests of model residuals.
plot_residuals_diagnostics( model, point.color = viridis::viridis(100, option = "F"), line.color = "gray10", fill.color = viridis::viridis(4, option = "F", alpha = 0.95)[2], option = 1, ncol = 1, verbose = TRUE )
model |
A model produced by |
point.color |
Colors of the plotted points. Can be a single color name (e.g. "red4"), a character vector with hexadecimal codes (e.g. "#440154FF" "#21908CFF" "#FDE725FF"), or function generating a palette (e.g. |
line.color |
Character string, color of the line produced by |
fill.color |
Character string, fill color of the bars produced by |
option |
(argument of |
ncol |
(argument of |
verbose |
Logical, if |
A patchwork object.
if(interactive()){
#load example data
data(plant_richness_df)
data(distance_matrix)
#fit a random forest model
x <- rf(
data = plant_richness_df,
dependent.variable.name = "richness_species_vascular",
predictor.variable.names = colnames(plant_richness_df)[5:21],
distance.matrix = distance_matrix,
n.cores = 1
)
#residuals diagnostics
plot_residuals_diagnostics(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.