Producing observed vs predicted plots
Usage
plotObsVsPred(
data,
metaData = NULL,
dataMapping = NULL,
plotConfiguration = NULL,
foldDistance = NULL,
smoother = NULL,
plotObject = NULL
)
Arguments
- data
A data.frame to use for plot.
- metaData
A named list of information about
data
such as thedimension
andunit
of its variables.- dataMapping
A
ObsVsPredDataMapping
object mappingx
,y
and aesthetic groups to their variable names ofdata
.- plotConfiguration
An optional
ObsVsPredConfiguration
object defining labels, grid, background and watermark.- foldDistance
Numeric values of fold distance lines to display in log plots. This argument is internally translated into
lines
field ofdataMapping
. Caution: this argument is meant for log scaled plots and since fold distance is a ratio it is expected positive. In particular, line of identity corresponds to afoldDistance
of1
.- 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
See also
Other molecule plots:
plotBoxWhisker()
,
plotCumulativeTimeProfile()
,
plotDDIRatio()
,
plotGrid()
,
plotHistogram()
,
plotObservedTimeProfile()
,
plotPKRatio()
,
plotPieChart()
,
plotQQ()
,
plotResVsPred()
,
plotResVsTime()
,
plotSimulatedTimeProfile()
,
plotTimeProfile()
,
plotTornado()
Examples
# Produce Obs vs Pred plot
obsVsPredData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4))
plotObsVsPred(data = obsVsPredData, dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"))
# Produce Obs vs Pred plot with linear regression
plotObsVsPred(
data = obsVsPredData,
dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"),
smoother = "lm"
)
# Produce Obs vs Pred plot with user-defined fold distance lines
plotObsVsPred(
data = obsVsPredData,
dataMapping = ObsVsPredDataMapping$new(x = "x", y = "y"),
plotConfiguration = ObsVsPredPlotConfiguration$new(
xScale = Scaling$log, xAxisLimits = c(0.05, 50),
yScale = Scaling$log, yAxisLimits = c(0.05, 50)
),
foldDistance = c(1, 10)
)