Learn R Programming

popdemo (version 1.3-1)

reac: Calculate reactivity and first-timestep attenuation

Description

Calculate reactivity (first-timestep amplification) and first-timestep attenuation for a population matrix projection model.

Usage

reac(A, vector = "n", bound = NULL, return.N = FALSE)

Arguments

A

a square, non-negative numeric matrix of any dimension

vector

(optional) a numeric vector or one-column matrix describing the age/stage distribution used to calculate a 'case-specific' reactivity/ first-timestep attenuation

bound

(optional) specifies whether an upper or lower bound should be calculated (see details).

return.N

(optional) if TRUE, returns population size in the first time interval (including effects of asymptotic growth and initial population size), alongside standardised reactivity/first-timestep attenuation.

Value

If vector="n", the upper bound on reactivity of A if bound="upper" and the lower bound on first-timestep attenuation of A if bound="lower". If vector is specified, the 'case-specific' reactivity or first-timestep attenuation of the model.

If return.N=TRUE, a list with components:

reac

the bound on or case-specific reactivity or first-timestep attenuation

N

the population size at the first timestep, including the effects of initial population size and asymptotic growth.

Details

reac returns a standardised measure of first-timestep amplification or attenuation, discounting the effects of both initial population size and asymoptotic growth (Stott et al. 2011).

If vector="n" then either bound="upper" or bound="lower" must be specified, which calculate the upper or lower bound on first-timestep amplification and attenuation (i.e. the largest and smallest values that reactivity and first-timestep attenuation may take) respectively. Specifying vector overrides calculation of a bound, and will yield a 'case-specific' reactivity/first-timestep attenuation.

If return.N=T then the function also returns realised population size (including the effects of asymptotic growth and initial population size).

reac works with imprimitive and irreducible matrices, but returns a warning in these cases.

NOTE: reac replaces reactivity and firststepatt as of version 1.0-0. Although semantically 'reactivity' and 'first-timestep attenuation' are different (the former is an amplification in the first timestep and the latter an attenuation in the first timestep), as a population matrix projection model EITHER amplifies OR attenuates in the first timestep, it made no sense to have two separate functions to calculate one thing (transient dynamics in the first timestep).

References

  • Neubert & Caswell (1997) Ecology, 78, 653-665.

  • Stott et al. (2011) Ecol. Lett., 14, 959-970.

  • Townley & Hodgson (2008) J. Appl. Ecol., 45, 1836-1839.

See Also

Other TransientIndices: Kreiss(), inertia(), maxamp(), maxatt()

Examples

Run this code
# NOT RUN {
  # Create a 3x3 PPM
  ( A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3) )

  # Create initial stage structures
  ( initial1 <- c(1,3,2) )
  ( initial2 <- c(3,1,1) )

  # Calculate the upper bound on reactivity of A
  reac(A, bound="upper")

  # Calculate the lower bound on first-timestep attenuation of A
  reac(A, bound="lower")

  # Calculate case-specific reactivity of A
  # when projected using specific demographic structure
  # that amplifies
  reac(A, vector=initial1)

  # Calculate case-specific reactivity of A
  # and initial1 and return realised population size
  reac(A, vector=initial1, return.N=TRUE)

  # Calculate case-specific first-timestep attenuation of A 
  # when projected using a specific demographic structure that
  #attenuates
  reac(A, vector=initial2)

  # Calculate case-specific first-timestep attenuation of A 
  # and initial2 and return realised population size
  reac(A, vector=initial2, return.N=TRUE)#'

# }

Run the code above in your browser using DataLab