Description Usage Arguments Details Value References See Also Examples
Determine whether a matrix is primitive or imprimitive
1 | isPrimitive(A)
|
A |
a square, non-negative numeric matrix of any dimension. |
isPrimitive
works on the premise that a matrix A is
primitive if A^(s^2-(2*s)+2) is positive, where s is the dimension
of A (Caswell 2001).
TRUE
(for an primitive matrix) or FALSE
(for an imprimitive
matrix).
Caswell (2001) matrix Population Models, 2nd. ed. Sinauer.
Other PerronFrobeniusDiagnostics:
isErgodic()
,
isIrreducible()
1 2 3 4 5 6 7 8 9 10 11 | # Create a 3x3 primitive PPM
( A <- matrix(c(0,1,2,0.5,0,0,0,0.6,0), byrow=TRUE, ncol=3) )
# Diagnose primitivity
isPrimitive(A)
# Create a 3x3 imprimitive PPM
B<-A; B[1,2] <- 0; B
# Diagnose primitivity
isPrimitive(B)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.