Biology Reference
In-Depth Information
the maximum eigenvalue, then we rename the maximum eigenvalue “lambda” with
the following two commands:
imax = find (E==max(E));
lambda = E(imax)
To calculate the right eigenvector, which gives the stable distribution of individuals
across stages, we use the following command to generate eigenvectors and their
associated eigenvalues:
[W,d]=eig (A)
(We are using the same eig (A) command as before, but now we are requesting
MATLAB to calculate right eigenvectors, which we define as W, and the associ-
ated eigenvalues, which MATLAB gives us as diagonals in the matrix that we have
labeled d.)
Next, we must pull out the dominant eigenvector and find its associated eigenvalue
using:
eigvals=diag(d);
imax = find(eigvals==max(eigvals));
w=W(:,imax)
Next, we need to rescale the dominant right eigenvector so that it sums to 1 and
represents proportions of individuals across stage classes:
dominant=w/sum(w)
7.9.2 Calculating Eigenvalues and Eigenvectors in R
If you are using R to conduct your calculations, first download and install the popbio
package.
We can define our projection matrix ( 7.2 ) as A in R with the following command:
A <- matrix (c(0, 0, 0, 0.27, 3.90, 40.00,
0.15, 0, 0, 0, 0, 0, 0, 0.21, 0.55,
0.05, 0, 0, 0, 0, 0.35, 0.45, 0, 0, 0,
0, 0, 0.41, 0.78, 0, 0, 0, 0, 0.05,
0.19, 1.0), nrow = 6, byrow = T)
To identify the dominant eigenvalue, which is the growth rate of the population, we
use the command
lambda (A)
To get the stable distribution of individuals across stages, standardized to total to 1,
we use the command
stable.stage (A)
Note that the R commands are tailored specifically for generating values directly
related to projection matrices in biology, rather than presenting all of the eigenvalues
 
Search WWH ::




Custom Search