sensitivity: Compute sensitivity

Description Usage Arguments Value

View source: R/perturb_analysis.R

Description

Compute sensitivity

Usage

 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
sensitivity(
  ipm,
  what = c("r_0", "lambda", "gen_t"),
  level = c("kernel", "vital_rate", "parameter"),
  subset = NA_character_,
  ...
)

## S3 method for class 'simple_di_det_ipm'
sensitivity(
  ipm,
  what = "lambda",
  level = "kernel",
  subset = NA_character_,
  n_iterations = 100,
  ...
)

## S3 method for class 'general_di_det_ipm'
sensitivity(
  ipm,
  what = "lambda",
  level = "kernel",
  subset = NA_character_,
  n_iterations = 100L,
  mega_mat,
  mega_vec,
  ...
)

Arguments

ipm

Output from make_ipm().

what

The numerator of the partial derivative for sensitivity. Possible options "lambda" (default), "r_0", and "gen_t". More will probably be added later.

level

The denominator of the partial derivative for sensitivity. "kernel" computes the model wide sensitivity surface and returns that. "vital_rate" computes lambda's sensitivity to specific vital rates, "parameter" lambda's sensitivity to each parameter. Use subset to specify a subset of vital rates or parameters to compute values for.

subset

A character vector corresponding to the "vital_rates" or "parameters" you want to compute sensitivities for. Can save time if only a few parameters or vital rates are of interest.

...

other arguments passed to methods.

n_iterations

For simple IPMs, number of times to iterate the model when computing the left and right eigenvectors.

mega_mat

A vector of names and/or 0s specifying the relationship between the kernels in the model. The names should correspond to kernel names, with 0s corresponding to sparse areas of the mega-matrix. The names can be either symbols or characters. These functions support suffix expansion as in define_k(ernel), so expressions don't need to be re-written for every combination hierarchical effects.

mega_vec

A vector of names specifying the format of the population vector. The names can be either symbols or characters.

Value

A list. Contains either kernel response surfaces, vital rate level sensitivity values, or parameter level sensitivity values. The class is always c("ipmr_sensitivity", "list") (for internal usage and plot methods).


levisc8/irage documentation built on March 6, 2020, 12:56 a.m.