isErgodic

0th

Percentile

Determine ergodicity of a matrix

Determine whether a matrix is ergodic or nonergodic

Usage
isErgodic(A, digits = 12, return.eigvec = FALSE)
Arguments
A

a square, non-negative numeric matrix of any dimension.

digits

the number of digits that the dominant left eigenvector should be rounded to.

return.eigvec

(optional) logical argument determining whether or not the dominant left eigenvector should be returned.

Details

isErgodic works on the premise that a matrix is ergodic if and only if the dominant left eigenvector (the reproductive value vector) of the matrix is positive (Stott et al. 2010).

In rare cases, R may calculate that the dominant left eigenvector of a nonergodic matrix contains very small entries that are approximate to (but not equal to) zero. Rounding the dominant eigenvector using digits prevents mistakes.

Value

If return.eigvec=FALSE, either TRUE (for an ergodic matrix) or FALSE (for a nonergodic matrix).

If return.eigvec=TRUE, a list containing elements:

ergodic

TRUE or FALSE, as above

eigvec

the dominant left eigenvector of A

References

  • Stott et al. (2010) Methods Ecol. Evol., 1, 242-252.

See Also

Other PerronFrobeniusDiagnostics: isIrreducible, isPrimitive

Aliases
  • isErgodic
Examples
# NOT RUN {
  # Create a 3x3 ergodic PPM
  ( A <- matrix(c(0,0,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3) )

  # Diagnose ergodicity
  isErgodic(A)

  # Create a 3x3 nonergodic PPM
  B<-A; B[3,2] <- 0; B

  # Diagnose ergodicity and return left eigenvector
  isErgodic(B, return.eigvec=TRUE)

# }
Documentation reproduced from package popdemo, version 1.3-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.