View source: R/sensitivity-tornado-plot.R
sensitivityTornadoPlot | R Documentation |
Generates tornado plots to visualize the results of sensitivity analysis.
Each plot shows the effect of modifying parameters by a specific scaling factor
(parameterFactor
) and its reciprocal on specific model outputs. This
visualization helps to assess the impact of parameter changes on the results,
highlighting the model's sensitivity to these parameters.
sensitivityTornadoPlot(
sensitivityCalculation,
outputPaths = NULL,
parameterPaths = NULL,
pkParameters = NULL,
parameterFactor = 0.1,
defaultPlotConfiguration = NULL
)
sensitivityCalculation |
The |
outputPaths , parameterPaths , pkParameters |
A single or a vector of the
output path(s), parameter path(s), and PK parameters to be displayed,
respectively. If |
parameterFactor |
Numeric; the scaling factor used to adjust parameters
during sensitivity analysis used in the tornado plot. Both the |
defaultPlotConfiguration |
An object of class Supported parameters include:
Default values are set to provide a standardized look, but each parameter can be tailored to fit specific visual needs. Modifying these parameters will directly affect the aesthetics of the output plots. |
A patchwork
object containing the combined ggplot objects if a
single output path is specified, or a list of patchwork
objects for
multiple output paths.
Other sensitivity-calculation:
sensitivityCalculation()
,
sensitivitySpiderPlot()
,
sensitivityTimeProfiles()
## Not run:
simPath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
simulation <- loadSimulation(simPath)
outputPaths <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
parameterPaths <- c(
"Aciclovir|Lipophilicity",
"Applications|IV 250mg 10min|Application_1|ProtocolSchemaItem|Dose",
"Neighborhoods|Kidney_pls_Kidney_ur|Aciclovir|Glomerular Filtration-GFR|GFR fraction"
)
results <- sensitivityCalculation(
simulation = simulation,
outputPaths = outputPaths,
parameterPaths = parameterPaths,
variationRange = c(seq(0.1, 1, by = 0.1), seq(2, 10, by = 1)),
)
# Print plots with default settings
sensitivityTornadoPlot(results)
# Print plots with specific parameter scaling factor
sensitivityTornadoPlot(results, parameterFactor = 0.5)
# Print plots with custom configuration settings
myPlotConfiguration <- createEsqlabsPlotConfiguration()
myPlotConfiguration$legendPosition <- "bottom"
myPlotConfiguration$subtitle <- "Custom settings"
sensitivityTornadoPlot(results, defaultPlotConfiguration = myPlotConfiguration)
# Use named parameter paths to customize axis labels
namedParameterPaths <- c(
"Lipophilicity" = "Aciclovir|Lipophilicity",
"Dose" = "Applications|IV 250mg 10min|Application_1|ProtocolSchemaItem|Dose",
"GFR fraction" = "Neighborhoods|Kidney_pls_Kidney_ur|Aciclovir|Glomerular Filtration-GFR|GFR fraction"
)
resultsNamed <- sensitivityCalculation(
simulation = simulation,
outputPaths = outputPaths,
parameterPaths = namedParameterPaths
)
sensitivityTornadoPlot(resultsNamed)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.