Calculates a set of performance statistics and optionally creates plots of modelled versus observed values.

analyse_modobs2(
  df,
  mod,
  obs,
  type = "points",
  relative = FALSE,
  shortsubtitle = FALSE,
  plot_subtitle = TRUE,
  plot_linmod = TRUE,
  pal = "viridis",
  ...
)

Arguments

df

A data frame containing columns with names corresponding to arguments mod and obs

mod

A character string specifying the variable name (column) of the modelled (simulated) values in data frame df.

obs

A character string specifying the variable name (column) of the observed values in data frame df.

type

If "points", uses geom_points(), if "hex" uses ggplot2::geom_hex(), if "heat" uses adjusted geom_points() with color indicating density, if "density" uses stat_density_2d() to draw polygons of equal density.

relative

A logical specifying whether the relative RMSE and bias (after division by the mean) is to be showed in the subtitle labels.

shortsubtitle

A logical specifying whether to display a reduced set of metrics in the subtitle.

plot_subtitle

A logical specifying whether to display any metrics. Defaults to TRUE.

plot_linmod

A logical specifying whether to display the fitted linear regression as a red line. Defaults to TRUE.

pal

A character string indicating the color palette. Currently available: "batlowW", "davos", "magma", "viridis", "cividis". Defaults to "viridis".

nlabels

An integer specifying how many points to be labelled, starting with points that have the largest residuals from the linear regression fit. Only available for type == "points". Defaults to one.