PlotLocalSens: Plot results of CalculateLocalSens function

Description Usage Arguments Details References See Also Examples

View source: R/PlotLocalSens.R

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 for the x axis.

y.sens

string with the name for the y axis of the sensitivity functions (when type = 6).

y.ind

string with the name for the y axis of 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
## 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")

## Plot local sensitivities
PlotLocalSens(local_solve_iasa2)

capm documentation built on May 29, 2017, 12:34 p.m.

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