Generate Residual Plots vs Covariate
plotResVsCov.RdThis function is a wrapper for plotYVsX with adjusted input parameters.
The following parameters are fixed and cannot be set:
observedDataDirection = 'y'yDisplayAsAbsolute = TRUEaddGuestLimits = FALSE(useplotRatio()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.framecontaining 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' thenggplot2::scale_y_log10()is used- ...
Arguments passed on to
plotYVsXgeomComparisonLineAttributesA
listof arguments passed toggplot2::hlineorggplot2::ablineto display comparison lines.geomGuestLineAttributesA
listof arguments passed toggplot2::geom_functionto display guest criteria.yDisplayAsAbsoluteA boolean that defines the direction of comparison lines.
addRegressionA boolean that activates the insertion of a regression line.
addGuestLimitsA boolean that activates the insertion of guest limits.
deltaGuestNumeric value parameter for the Guest function.
labelGuestCriteriaLabel used in the legend for guest criteria (default: "guest criteria").
asSquarePlotA boolean; if true, the plot is returned as a square plot with aspect ratio = 1 and fixed ratios.
observedDataDirectionEither 'x' or 'y', defining the direction of observed data.
groupAestheticsA 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".metaDataA named list of information about
datasuch as thedimensionandunitof its variables.geomPointAttributesA
listwith arguments which are passed on to the callggplot2::geom_pointgeomErrorbarAttributesA
listwith arguments which are passed on to the callggplot2::geom_errorbargeomLLOQAttributesA
listwith arguments which are passed on to the callggplot2::geom_hlinexscaleeither 'linear' then
ggplot2::scale_x_continuous()or 'log' thenggplot2::scale_x_log10()is usedxscale.argslist of arguments passed to
ggplot2::scale_x_continuous()orggplot2::scale_x_log10()yscale.argslist of arguments passed to
ggplot2::scale_y_continuous()orggplot2::scale_y_log10()
See also
Other plot functions:
plotBoxWhisker(),
plotForest(),
plotHistogram(),
plotPredVsObs(),
plotQQ(),
plotRangeDistribution(),
plotRatioVsCov(),
plotTimeProfile(),
plotYVsX()