Skip to contents

This function visualizes the residuals against observed values, helping to assess model performance.

Usage

ospsuite_plotResidualsVsObserved(
  plotData,
  metaData = NULL,
  mapping = ggplot2::aes(),
  ...
)

Arguments

plotData

An object of class DataCombined or a data.frame generated by a DataCombined object. Units should be consistent; if not, use `convertUnits(myDataCombined)` to standardize.

metaData

A list containing metadata for the plot. If NULL, a default list is constructed from the data.

mapping

additional mappings specified by user

...

Additional arguments passed to `ospsuite.plots::plotResVsCov`.

Value

A `ggplot2` plot object representing residuals vs observed values.

Examples

if (FALSE) { # \dontrun{
# Generate a residuals vs observed plot for the provided data
plotResidualsVsObserved(convertUnits(
  myDataCombined,
  xUnit = ospUnits$Time$h,
  yUnit = ospUnits$`Concentration [mass]`$`µg/l`
))
} # }