sensitivity {fluxweb} | R Documentation |
sensitivity analysis
Description
Assesses how sensitive the results from argument function are to variability of input parameter through coefficient of variation.
Usage
sensitivity(fun.name, param.name, var, n, full.output = FALSE, ...)
Arguments
fun.name |
Function to analyse. |
param.name |
Parameter from |
var |
Define the interval of uncertainty for the uniform law around |
n |
Number of replicates. |
full.output |
Logical, if |
... |
Arguments to be passed to |
Details
At each replicate, a coefficient of variation is computed (relative to results obtained form fun.name
without random variation).
if full.output
is FALSE
(default) a list of two objects of the same type as the one produced by fun.name
is returned,
first element contains the mean coefficient of variation in comparison to non randomised inputs among all the replicates,
second element contains the standard deviation of these coefficients of variation
If full.output
is TRUE
, a list of size n
with of objects containing the coefficients of variation is returned.
Argument for ...
should be passed with their names.
Value
a list of two elements of the same type as param.name
:
first element contains the mean coefficient of variation in comparison to non randomised inputs among all the replicates,
second element contains the standard deviation of these coefficient of variation
Examples
# first compute species per unit biomass metabolic rates using the metabolic theory:
losses = 0.1 * species.level$bodymasses^(-0.25)
res = sensitivity(fluxing, "mat", 0.1, 5, full.output = TRUE,
mat = species.level$mat,
biomasses = species.level$biomasses,
losses = losses,
efficiencies = species.level$efficiencies)
res = sensitivity(fluxing, "efficiencies", 0.01, 50,
mat = species.level$mat,
biomasses = species.level$biomasses,
losses = losses,
efficiencies = species.level$efficiencies)
# growth rates of basal species
growth.rates = rep(NA, dim(species.level$mat)[1])
growth.rates[colSums(species.level$mat) == 0] = 0.5
val.mat = fluxing(species.level$mat, species.level$biomasses, losses, species.level$efficiencies)