Plots a Quantile-Quantile plot, grouped by "group".
This function visualizes the distribution of predicted vs observed values using a Q-Q plot.
Usage
plotQuantileQuantilePlot(
plotData,
metaData = NULL,
mapping = ggplot2::aes(),
xUnit = NULL,
yUnit = NULL,
residualScale = "log",
...
)Arguments
- plotData
An object of class
DataCombinedor adata.table. If adata.table, it must include the following:xValues: Numeric time points.yValues: Observed or simulated values (numeric).group: Grouping variable (factor or character).name: Name for the dataset (factor or character).xUnit: Unit of the x-axis values (character).yUnit: Unit of the y-axis values (character).dataType: Specifies data type—eitherobservedorsimulated.Optional:
yErrorType: Type of y error, relative toospsuite::DataErrorType.yErrorValues: Numeric error values.yMin,yMax: Custom ranges for y-axis instead of error types.IndividualId: Used for aggregation of simulated population data.
- metaData
A list containing metadata for the plot. If NULL, a default list is constructed from the data. Expected structure includes information about dimensions and units for both x and y axes.
- mapping
A ggplot2 aesthetic mapping object. Default is
ggplot2::aes(). This is added or replaces the default mapping constructed by the data.- xUnit
A character string specifying the target unit for the x-axis. If
NULL(default), the most frequent unit in the data is used. For available units, seeospsuite::ospUnits.- yUnit
A character string specifying the target unit for the simulated and observed y-values used for residual calculation. If
NULL(default), the most frequent unit in the data is used. For available units, seeospsuite::ospUnits.- residualScale
Either "linear", "log", or "ratio" method for computing residuals. Default is
log.- ...
Arguments passed on to
ospsuite.plots::plotQQxScaleArgslist of arguments passed to
ggplot2::scale_x_continuous()orggplot2::scale_x_log10()yScaleArgslist of arguments passed to
ggplot2::scale_y_continuous()orggplot2::scale_y_log10()geomQQAttributesA list of arguments passed to
ggplot2::stat_qq().geomQQLineAttributesA list of arguments passed to
ggplot2::stat_qq_line().
See also
Other plot functions based on ospsuite.plots:
plotPredictedVsObserved(),
plotResidualsAsHistogram(),
plotResidualsVsCovariate(),
plotTimeProfile()