Plot results of CalculateLocalSens function

Description

Plot results of the CalculateLocalSens function.

Usage

1
2
3
PlotLocalSens(local.out = NULL, x.sens = "Time", y.sens = "Sensitivity",
  y.ind = c("L1", "L2", "Mean", "Min", "Max"), label.size = 10,
  x.axis.angle = 90, type = 1)

Arguments

local.out

output from CalculateLocalSens function.

x.sens

string with the name of x axis for sensitivity functions.

y.sens

string with the name of y axis for sensitivity functions.

y.ind

string with the name of y axis for the parameter importance indices.

label.size

a number to specify the size of axes labels and text.

x.axis.angle

a number with angle of rotation for x axis text. Passed to angle argument of element_text.

type

a number to define the type of graphical output. 1: importance index L1; 2: importance index L2; 3: mean of sensitivity functions; 5: minimum of sensitivity functions; and 5: maximum of sensitivity functions; 6: sensitivity functions and all importance indices are ploted.

Details

Font size of saved plots is usually different to the font size seen in graphic browsers. Before changing font sizes, see the final result in saved (or preview) plots.

References

Chang W (2012). R Graphics Cookbook. O'Reilly Media, Inc.

Soetaert K, Cash J and Mazzia F (2012). Solving differential equations in R. Springer.

http://oswaldosantos.github.io/capm

See Also

plot.sensFun.

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
28
29
30
31
#####################
## SolveIASA 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')

## Plot local sensitivities
# Uncomment the following line:
# PlotLocalSens(local.solve.iasa2)