View source: R/sensitivity-calculation.R
sensitivityCalculation | R Documentation |
Carry out and visualize sensitivity analysis (with OSPSuite)
sensitivityCalculation(
simulation,
outputPaths,
parameterPaths,
variationRange = c(seq(0.1, 1, by = 0.1), seq(2, 10, by = 1)),
variationType = c("relative"),
pkParameters = c("C_max", "t_max", "AUC_inf"),
customOutputFunctions = NULL,
saOutputFilePath = NULL,
simulationRunOptions = NULL
)
simulation |
An object of type |
outputPaths |
Path (or a vector of paths) to the output(s) for which the sensitivity will be analyzed. |
parameterPaths |
A single or a vector of the parameter path(s) to be varied. Can also be a named vector, where the names are user-defined labels. These names will be stored and used in downstream plotting functions (e.g., as legend labels) if provided. |
variationRange |
Optional numeric vector or list defining the scaling of
the parameters. The same variation range is applied to all specified parameters
unless a list is provided, in which case the length of the list must match
the length of |
variationType |
A string specifying whether the values in |
pkParameters |
A vector of names of PK parameters for which the
sensitivities will be calculated. For a full set of available standard PK
parameters, run |
customOutputFunctions |
A named list with custom function(s) for output calculations. User-defined functions should have either 'x', 'y', or both 'x' and 'y' as parameters which correspond to x-Dimension (time) or y-Dimension values from simulation results. The output of the function is a single numerical value for each output and parameter path, which is then included in the returned dataframe of PK parameters. |
saOutputFilePath |
Path to excel file in which PK-parameter data should
be saved. If a file already exists, it will be overwritten. Default is |
simulationRunOptions |
Optional instance of a |
A list containing following objects:
SimulationResults
specified output paths
specified parameter paths
A data frame of PK parameters
Other sensitivity-calculation:
sensitivitySpiderPlot()
,
sensitivityTimeProfiles()
,
sensitivityTornadoPlot()
## 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"
)
# extract the results into a list of dataframes
sensitivityCalculation(
simulation = simulation,
outputPaths = outputPaths,
parameterPaths = parameterPaths
)
# Calculate sensitivity for a user-defined function that computes the
# averate of the simulated y-values
customOutputFunctions <- list(
"Average" = function(y) mean(y)
)
sensitivityCalculation(
simulation = simulation,
outputPaths = outputPaths,
parameterPaths = parameterPaths,
customOutputFunctions = customOutputFunctions
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.