Skip to contents

One panel per variable: the response curves of the models (thin lines for runs), labelled with their shape, the calibrated range (dotted lines) and, beneath the curves, the density of the records along the gradient (grey), so you can see whether the modelled response follows the data or the algorithm.

Usage

plot_response_check(
  x,
  variables = NULL,
  models = NULL,
  base_size = 11,
  file = NULL,
  width = 3000,
  height = 1800
)

Arguments

x

A result of response_check().

variables

Optional subset of variables.

models

Optional subset of models.

base_size

Base font size.

file

Optional file(s) to save the plot to, e.g. "fig.pdf" or c("fig.png", "fig.pdf"); the format follows the extension, and a name without extension is saved as PNG and PDF.

width, height

Size of the saved figure in pixels (PDF and SVG at 300 pixels per inch).

Value

A ggplot object.

References

Fiorentino, D., Nunez-Riboni, I., Pierce, M.E., Oesterwind, D., Akimova, A. (2025) Improving species distribution models for climate change studies: ecological plausibility and performance metrics. Ecological Modelling 508, 111207. doi:10.1016/j.ecolmodel.2025.111207

Examples

v <- seq(0, 30, length.out = 60)
curves <- data.frame(variable = "temp", value = v,
                     suitability = exp(-(v - 15)^2 / 40))
plot_response_check(response_check(curves))