CalculateLocalSens: Local sensitivity analysis

Description Usage Arguments Details Value References See Also Examples

View source: R/CalculateLocalSens.R

Description

Wraper for sensFun function, which estimates local effect of all model parameters on population size, applying the so-called sensitivity functions. The set of parameters used in any of the following functions can be assessed: SolveIASA, SolveSI or SolveTC.

Usage

1
CalculateLocalSens(model.out = NULL, sensv = "n")

Arguments

model.out

an output from one of the previous functions or a list with equivalent structure.

sensv

string with the name of the output variables for which sensitivity are to be estimated.

Details

For further arguments of sensFun, defaults are used. See the help page of this function for details. Methods for class "sensFun" can be used.

Value

a data.frame of class sensFun containing the sensitivity functions. There is one row for each sensitivity variable at each independent time. The first column x, contains the time value; the second column var, the name of the observed variable; and remaining columns have the sensitivity parameters.

References

Soetaert K and Petzoldt T (2010). Inverse modelling, sensitivity and monte carlo analysis in R using package FME. Journal of Statistical Software, 33(3), pp. 1-28.

Reichert P and Kfinsch HR (2001). Practical identifiability analysis of large environmental simulation models. Water Resources Research, 37(4), pp.1015-1030.

http://oswaldosantos.github.io/capm

See Also

sensRange.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## IASA model

## Parameters and intial conditions.
pars_solve_iasa = c(
   b1 = 21871, b2 = 4374,
   df1 = 0.104, dm1 = 0.098, df2 = 0.125, dm2 = 0.118,
   sf1 = 0.069, sf2 = 0.05, sm1 = 0.028, sm2 = 0.05,
   k1 = 98050, k2 = 8055, h1 = 1, h2 = 0.5,
   a = 0.054, alpha = 0.1, v = 0.2, z = 0.1)
   
init_solve_iasa = c(
   f1 = 33425, fs1 = 10865,
   m1 = 38039, ms1 = 6808,
   f2 = 3343, fs2 = 109,
   m2 = 3804, ms2 = 68)
   

# Solve for point estimates.
solve_iasa_pt <- SolveIASA(pars = pars_solve_iasa, 
                          init = init_solve_iasa, 
                          time = 0:15, method = "rk4")

## Calculate local sensitivities to all parameters.
local_solve_iasa2 <- CalculateLocalSens(
  model.out = solve_iasa_pt, sensv = "n2")
local_solve_iasa1 <- CalculateLocalSens(
  model.out = solve_iasa_pt, sensv = "n1")

capm documentation built on May 19, 2017, 10:30 a.m.

Search within the capm package
Search all R packages, documentation and source code