plotResVsPred: plotResVsPred

View source: R/plot-res-vs-pred.R

plotResVsPredR Documentation

plotResVsPred

Description

Producing residuals vs predicted plots

Usage

plotResVsPred(
  data,
  metaData = NULL,
  dataMapping = NULL,
  plotConfiguration = NULL,
  smoother = NULL,
  plotObject = NULL
)

Arguments

data

A data.frame to use for plot.

metaData

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

dataMapping

A ResVsPredDataMapping object mapping x, y and aesthetic groups to their variable names of data.

plotConfiguration

An optional ResVsPredConfiguration object defining labels, grid, background and watermark.

smoother

Optional name of smoother function:

  • "loess" for loess regression

  • "lm" for linear regression

plotObject

An optional ggplot object on which to add the plot layer

Value

A ggplot object

See Also

Other molecule plots: plotBoxWhisker(), plotCumulativeTimeProfile(), plotDDIRatio(), plotGrid(), plotHistogram(), plotObsVsPred(), plotObservedTimeProfile(), plotPKRatio(), plotPieChart(), plotQQ(), plotResVsTime(), plotSimulatedTimeProfile(), plotTimeProfile(), plotTornado()

Examples

# Produce Obs vs Pred plot
resVsPredData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4))

plotResVsPred(data = resVsPredData, dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"))

# Produce Res vs Pred plot with linear regression
plotResVsPred(
  data = resVsPredData,
  dataMapping = ResVsPredDataMapping$new(x = "x", y = "y"),
  smoother = "lm"
)

Open-Systems-Pharmacology/TLF-Library documentation built on Feb. 8, 2025, 11:22 a.m.