plot_quantile_residuals: Plot quantile residuals on map

View source: R/plot_quantile_residuals.R

plot_quantile_residualsR Documentation

Plot quantile residuals on map

Description

plot_quantile_residuals shows aggregated quantile residuals at a user-specified spatial resolution

This function plots quantile residuals on a map, and is useful to check for persistent spatial patterns in those residuals. For a check for outliers (i.e., the scale of residuals) please see the separate Q-Q plot. See summary.fit_model for more details regarding inputs

Usage

plot_quantile_residuals(
  dharmaRes,
  fit,
  file_name = "quantile_residuals_on_map",
  zlim = NULL,
  n_cells_residuals = NULL,
  year_labels = fit$year_labels,
  years_to_plot = fit$years_to_plot,
  ...
)

Arguments

zlim

two numeric values, specifying range for defining bounds of color scale. If zlim=NULL, then a constant scale is inferred from the range of the plotted variable and a color-legend is plotted in the last panel. If zlim=NA then a different range is used in each panel from the range of Y_gt[,t] and a color-legend is plotted in every panel.

n_cells_residuals

number of raster cells to use when plotting quantile residuals

year_labels

character vector specifying names for labeling times t_i

years_to_plot

integer vector, specifying positions of year_labels for plotting (used to avoid plotting years with no data, etc.)

...

arguments passed to plot_variable

output

from summary.fit_model(x,what="residuals")

x

Output from fit_model


James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.