Produces the Matrix Population Model matrix for a continuous time structured
population model, to be applied in a linear ODE. If there is more than one population,
returns a list of matrices, or one block-diagonal matrix created by the combination.
Usage
mat.model(data, ns, combine.matrices = FALSE)
Arguments
data
Either the result of a simulation, to extract the parameters from, or a
data.frame containing the parameters.
ns
an array of numbers of stages. Use when data is a data.frame and the is
more than one population.
combine.matrices
Logical. Combine the matrices into a single, multi-population matrix?
# NOT RUN {# example 1mat.model(create.parameters(n=4))
# example 2 data(malthusian)
mat.model(malthusian)
# example 3data(twospecies)
mat.model(twospecies,combine.matrices=TRUE)
# }