Skip to contents

This function is a wrapper for plotYVsX with adjusted input parameters.

The following parameters are fixed and cannot be set:

  • observedDataDirection = 'y'

  • yDisplayAsAbsolute = TRUE

  • addGuestLimits = FALSE (use plotRatio() if needed)

For details and examples, see the vignettes:

  • vignette("Goodness of fit", package = "ospsuite.plots")

  • vignette("ospsuite.plots", package = "ospsuite.plots")

Usage

plotResVsCov(
  data,
  mapping,
  residualScale = ResidualScales$log,
  comparisonLineVector = 0,
  yscale = AxisScales$linear,
  ...
)

Arguments

data

A data.frame containing the data to plot.

mapping

A list of aesthetic mappings to use for the plot.

residualScale

Either "linear", "log", or "ratio" scale for residuals.

comparisonLineVector

A vector defining the comparison lines.

yscale

either 'linear' then ggplot2::scale_y_continuous() or 'log' then ggplot2::scale_y_log10() is used

...

Arguments passed on to plotYVsX

geomComparisonLineAttributes

A list of arguments passed to ggplot2::hline or ggplot2::abline to display comparison lines.

geomGuestLineAttributes

A list of arguments passed to ggplot2::geom_function to display guest criteria.

yDisplayAsAbsolute

A boolean that defines the direction of comparison lines.

addRegression

A boolean that activates the insertion of a regression line.

addGuestLimits

A boolean that activates the insertion of guest limits.

deltaGuest

Numeric value parameter for the Guest function.

labelGuestCriteria

Label used in the legend for guest criteria (default: "guest criteria").

asSquarePlot

A boolean; if true, the plot is returned as a square plot with aspect ratio = 1 and fixed ratios.

observedDataDirection

Either 'x' or 'y', defining the direction of observed data.

groupAesthetics

A character vector of aesthetic names used for grouping data points when calculating comparison statistics. Data will be grouped by combinations of these aesthetics before computing counts and proportions within comparison lines. Common grouping aesthetics include "colour", "fill", "shape".

metaData

A named list of information about data such as the dimension and unit of its variables.

geomPointAttributes

A list with arguments which are passed on to the call ggplot2::geom_point

geomErrorbarAttributes

A list with arguments which are passed on to the call ggplot2::geom_errorbar

geomLLOQAttributes

A list with arguments which are passed on to the call ggplot2::geom_hline

xscale

either 'linear' then ggplot2::scale_x_continuous() or 'log' then ggplot2::scale_x_log10() is used

xscale.args

list of arguments passed to ggplot2::scale_x_continuous() or ggplot2::scale_x_log10()

yscale.args

list of arguments passed to ggplot2::scale_y_continuous() or ggplot2::scale_y_log10()

Value

A ggplot object representing the residual plots.