Description Usage Arguments Value Note Author(s) Source References Examples

This function builds one projection matrix from a time series of number (or densities) of individuals per stage (size classes or life stages) using Wood's quadratic programming method. The matrix model also requires a constraint matrix C, vector b, and vector listing nonzero elements of desired projection matrix.

1 |

`nout` |
A time series of population vectors |

`C` |
C constraint matrix |

`b` |
b vector |

`nonzero` |
indices of the non-zero elements of the transition matrix (counting by column) |

A projection matrix.

This function required solve.QP in the 'quadprog' package , which should be installed and loaded on the user's system.

Original Matlab code in Caswell (2001: 148). Adapted to R by Patrick Nantel

converted Matlab code from Example 6.3 in Caswell (2001)

Caswell, H. 2001. Matrix population models. Construction, Analysis and interpretation. 2nd ed. Sinauer, Sunderland, Massachusetts.

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
data(nematode)
## list nonzero elements
nonzero <- c( 1, 2, 5, 6, 7, 9)
## create C matrix
C <- rbind(diag(-1,6), c(1,1,0,0,0,0), c(0,0,1,1,0,0), c(0,0,0,0,0,1))
## calculate b (transpose is not necessary - either way works)
b <- apply(C, 1, max)
QPmat(nematode, C,b,nonzero)
## End(Not run)
``` |

```
J2 J3+J4 adult
J2 -3.555068e-33 0.0000000 0.01423089
J3+J4 1.000000e+00 0.4613452 0.00000000
adult 0.000000e+00 0.5386548 0.96643504
```

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.