Learn R Programming

capm (version 0.14.0)

PlotLocalSens: Plot results of CalculateLocalSens function

Description

Plot results of the CalculateLocalSens function.

Usage

PlotLocalSens(local.out = NULL, x.sens = "Time",
  y.sens = "Sensitivity", y.ind = c("L1", "L2", "Mean", "Min", "Max"),
  bar.colors = "DarkRed", 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.

bar.colors

any valid specification of a color.

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.

Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine.

http://oswaldosantos.github.io/capm

See Also

plot.sensFun.

Examples

Run this code
# NOT RUN {
## IASA model#' 
## Parameters and intial conditions.
data(dogs)
dogs_iasa <- GetDataIASA(dogs,
                        destination.label = "Pinhais",
                        total.estimate = 50444)
# Solve for point estimates.
solve_iasa_pt <- SolveIASA(pars = dogs_iasa$pars,
                         init = dogs_iasa$init,
                         time = 0:15,
                         alpha.owned = TRUE,
                         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)

# }

Run the code above in your browser using DataLab