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
)A patchwork object.
A model produced by rf(), rf_repeat(), or rf_spatial().
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. viridis::viridis(100)). Default: viridis::viridis(100, option = "F")
Character string, color of the line produced by ggplot2::geom_smooth(). Default: "gray30"
Character string, fill color of the bars produced by ggplot2::geom_histogram(). Default: viridis::viridis(4, option = "F", alpha = 0.95 )[2]
(argument of plot_moran()) Integer, type of plot. If 1 (default) a line plot with Moran's I and p-values across distance thresholds is returned. If 2, scatterplots of residuals versus lagged residuals per distance threshold and their corresponding slopes are returned. In models fitted with rf_repeat(), the residuals and lags of the residuals are computed from the median residuals across repetitions. Option 2 is disabled if x is a data frame generated by moran().
(argument of plot_moran()) Number of columns of the Moran's I plot if option = 2.
Logical, if TRUE, the resulting plot is printed, Default: TRUE
Other visualization:
plot_evaluation(),
plot_importance(),
plot_moran(),
plot_optimization(),
plot_response_curves(),
plot_response_surface(),
plot_training_df(),
plot_training_df_moran(),
plot_tuning()
data(plants_rf)
plot_residuals_diagnostics(plants_rf)
Run the code above in your browser using DataLab