sensitivity: sensitivity analysis

Description Usage Arguments Details Value Examples

Description

Assesses how sensitive the results from argument function are to variability of input parameter through coefficient of variation.

Usage

1
sensitivity(fun.name, param.name, var, n, full.output = FALSE, ...)

Arguments

fun.name

Function to analyse.

param.name

Parameter from ... on which variation is applied.

var

Define the interval of uncertainty for the uniform law around x as [x - x*var, x + x*var].

n

Number of replicates.

full.output

Logical, if TRUE all of n estimations of fun.name are returned. Only their mean otherwise.

...

Arguments to be passed to fun.name. Argument names must exactly match those of fun.name.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# 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)

fluxweb documentation built on May 2, 2019, 6:49 a.m.