Learn R Programming

capm (version 0.14.0)

CalculateGlobalSens: Global sensitivity analysis

Description

Wraper for sensRange function, which calculates sensitivities of population sizes to parameters used in one of the following functions: SolveIASA, SolveSI or SolveTC.

Usage

CalculateGlobalSens(model.out = NULL, ranges = NULL, sensv = NULL,
  all = FALSE)

Arguments

model.out

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

ranges

output from the SetRanges function applied to the pars argument used in the function specified in model.out.

sensv

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

all

logical. If FALSE, sensitivity ranges are calculated for each parameter. If TRUE, sensitivity ranges are calculated for the combination of all aparameters.

Value

A data.frame (extended by summary.sensRange when all == TRUE) containing the parameter set and the corresponding values of the sensitivity output variables.

Details

When all is equal to TRUE, dist argument in sensRange is defined as "latin" and when equal to FALSE, as "grid". The num argument in sensRange is defined as 100.

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.

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

sensRange.

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')

## Set ranges 10 % greater and lesser than the
## point estimates.
rg_solve_iasa <- SetRanges(pars = dogs_iasa$pars)

## 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)

# }

Run the code above in your browser using DataLab