Learn R Programming

capm (version 0.9.1)

PlotGlobalSens: Plot results of GlobalSens function

Description

Plot results of of CalculateGlobalSens function.

Usage

PlotGlobalSens(global.out = NULL, x.label = "Time", y.label = "Population", legend.label = "Sensitivity range", mm.label = "min - max", sd.label = "mean +- sd ")

Arguments

global.out
output from CalculateGlobalSens function.
x.label
string with the name of x axis.
y.label
string with the name of y axis.
legend.label
string with name for the legend.
mm.label
string with the name of the envelope calculated using the minimum and maximum ranges.
sd.label
string with the name of the envelope calculated using the mean +- standard deviation ranges.

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. Other details of the plot can be modifyed using appropriate functions from ggplot2 package.

References

http://oswaldosantos.github.io/capm

See Also

plot.deSolve.

Examples

Run this code
#####################
## 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')

## Set ranges 10 % greater and lesser than the
## point estimates.
rg.solve.iasa <- SetRanges(pars = pars.solve.iasa)

## Calculate golobal sensitivity of combined parameters.
## To calculate global sensitivity to each parameter, set
## all as FALSE.
glob.all.solve.iasa <- CalculateGlobalSens(
  model.out = solve.iasa.pt,
  ranges = rg.solve.iasa, 
  sensv = 'n2', all = TRUE)

### Plot the sensitivities of combined parameters.
PlotGlobalSens(glob.all.solve.iasa)

Run the code above in your browser using DataLab