# pfister.plot: Create log-log plots of variance vs. sensitivity and CV vs.... In popbio: Construction and Analysis of Matrix Population Models

## Description

Create log-log plots of both variance vs. sensitivity and CV vs. elasticity in matrix elements. Plots are based on Figure 2 in Pfister(1998).

## Usage

 `1` ```pfister.plot(A) ```

## Arguments

 `A` A list of two or more annual projection matrices

## Details

Calculates mean, variance and coefficient of variation (CV) of matrix elements from a list of two or more projection matrices. The sensitivity and elasticity matrices are then calculated from the mean matrix using `eigen.analysis`

## Value

Creates two log-log plots similar to Figure 2 in Pfister(1998) and outputs a data.frame with 5 columns listing mean, variance, CV, sensitivity and elasticity for matrix elements with a mean and variance > 0.

Chris Stubben

## References

Pfister, CA. 1998. Patterns of variance in stage-structured populations: Evolutionary predictions and ecological implications. PNAS 95:213-218.

## Examples

 ``` 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 30 31 32 33 34 35 36``` ```## 4 Hudsonia matrices data(hudsonia) pfister.plot(hudsonia) ## 3 Mimulus cardinalis matrices at Carlon data(monkeyflower) mim <- subset(monkeyflower, species == "cardinalis" & site == "Carlon" & year != "pooled", select = c(4:19)) ## convert data frame to list of matrices using split mim1 <-split(mim, 2000:2002) mim2 <-lapply(mim1, matrix, nrow=4, byrow=TRUE) vr1 <- pfister.plot(mim2) vr1 ## PLOT using labels plot(vr1\$cv, vr1\$elas, xlab="CV", ylab="Elasticity", log="xy", type='n') # Split matrix elements into transitions representing F (fertility), # S (survival), G (growth), and R (retrogression). # Fertility on top row, survival on diagonal, growth is above diagonal # and retrogression below diagonal. rownames(vr1) y2 <- expression(S[11],G[21],G[31],G[41], F[12],S[22],G[32],G[42], F[13],R[23],S[33],G[43], F[14],R[34],S[44]) text(vr1\$cv, vr1\$elas, y2) ### add trend line abline(lm(log10(vr1\$elas)~log10(vr1\$cv)), col="red") ## include Spearman's rank correlation a <- cor.test(vr1\$cv, vr1\$elas, method="spearman") a text(10, .0015, substitute(rho == x, list(x=round(a\$estimate,2))), col="blue") ```

popbio documentation built on May 4, 2018, 1:04 a.m.