View source: R/plot-observed-vs-simulated.R
plotObservedVsSimulated | R Documentation |
Observed versus predicted/simulated scatter plot
plotObservedVsSimulated(
dataCombined,
defaultPlotConfiguration = NULL,
foldDistance = NULL
)
dataCombined |
A single instance of |
defaultPlotConfiguration |
A |
foldDistance |
A vector for plotting lines at required fold distances
around the identity line ( |
Other plotting:
DefaultPlotConfiguration
,
plotIndividualTimeProfile()
,
plotPopulationTimeProfile()
,
plotResidualsVsSimulated()
,
plotResidualsVsTime()
# simulated data
simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)
simResults <- runSimulations(sim)[[1]]
outputPath <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
# observed data
obsData <- lapply(
c("ObsDataAciclovir_1.pkml", "ObsDataAciclovir_2.pkml", "ObsDataAciclovir_3.pkml"),
function(x) loadDataSetFromPKML(system.file("extdata", x, package = "ospsuite"))
)
names(obsData) <- lapply(obsData, function(x) x$name)
# Create a new instance of `DataCombined` class
myDataCombined <- DataCombined$new()
# Add simulated results
myDataCombined$addSimulationResults(
simulationResults = simResults,
quantitiesOrPaths = outputPath,
groups = "Aciclovir PVB"
)
# Add observed data set
myDataCombined$addDataSets(obsData$`Vergin 1995.Iv`, groups = "Aciclovir PVB")
# Create a new instance of `DefaultPlotConfiguration` class
myPlotConfiguration <- DefaultPlotConfiguration$new()
myPlotConfiguration$title <- "My Plot Title"
myPlotConfiguration$subtitle <- "My Plot Subtitle"
myPlotConfiguration$caption <- "My Sources"
# plot
plotObservedVsSimulated(myDataCombined, myPlotConfiguration)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.