Population models in R
The idea is old and still remarkable: write down how likely an individual is to survive, to grow and to reproduce, arrange those numbers in a matrix, and the dominant eigenvalue tells you whether the population grows. Nothing about a projection matrix is statistical. It is bookkeeping made precise, and its power comes from the fact that it forces you to say exactly what you believe about every stage of the life cycle.
This page collects every demographic modelling tutorial on this site: matrices, their continuous successor, and the models that join demographic data to counts. All of them are built by hand in base R.
What lambda is, and what it is not
The dominant eigenvalue is an asymptotic property of a matrix, not a forecast for a population. It says what the growth rate would settle to if the matrix stayed fixed forever and the population reached its stable structure. Real populations do neither. That is not an objection to the method, it is the method’s contract, and the interesting work is in what happens when you read the contract carefully.
Two consequences that matter in practice. First, transients: a population that is not at its stable structure can grow or shrink for years in the opposite direction to lambda, purely from its starting composition, and a management report that quotes lambda alone has said nothing about the next decade. Second, variance: environmental variation does not average out. The long-run stochastic growth rate sits below the growth rate of the mean matrix, and the gap widens with the variance, which is why a mean-matrix answer is systematically optimistic.
Which rate should you act on?
This is the question the matrix answers best. Sensitivity says how much lambda moves when an element moves by an absolute amount, elasticity says the same in proportional terms, and the two rank vital rates differently. The trap is a specific one and it recurs: the vital rate that DIFFERS most between two populations is not the rate that CONTRIBUTES most to the difference in their growth. A retrospective decomposition answers the second question, and it is the second question that management wants.
Age, stage, size, and a name collision
Age works when age determines fate. For a plant, a coral or a fish it usually does not: a small twenty-year-old and a large five-year-old have the same future, so the classification should be stage or size. Push that to the limit and the classes vanish: an integral projection model replaces the matrix with a kernel built from regressions, and the arithmetic goes on unchanged. It brings two numerical traps of its own, eviction and mesh, which are discretisation artefacts rather than biology and which bias the growth rate quietly.
One warning about the literature, because this page links to both: IPM means two different things. An integral projection model is the continuous-size matrix. An integrated population model is a joint likelihood over counts, capture-recapture and productivity data. They share an abbreviation and nothing else.
The data problem
A run of counts cannot separate survival from recruitment. The likelihood is flat along that ridge, and no cleverness in the model recovers what the data never contained. Integrated models solve it by adding the data that carries the missing information, and they do something slightly uncanny in the process: they will report an estimate for a parameter you have no direct data on at all, borrowed through the joint structure. That is real information, and it is also where an integrated model can hide a conflict between its data sources behind a plausible answer.
The tutorials
From vital rates to a growth rate
- Life tables and population growth - age-specific survival and fecundity, and the Euler-Lotka route to lambda.
- Leslie matrix population models - the projection matrix, its eigenvalue, and the stable age distribution.
- Stage-structured Lefkovitch matrices - when stage rather than age sets an individual’s fate.
What the matrix is for
- Sensitivity and elasticity - ranking vital rates for action, with the eigenvector formula checked numerically.
- Transient dynamics - amplification and attenuation before the asymptotic answer arrives.
- Life table response experiments - the largest change is not the largest contribution.
When the environment varies
- Stochastic population growth - why variance pulls long-run growth below the mean-matrix value.
- Population viability analysis - quasi-extinction risk from counts, and how little a short series settles.
Continuous size: the integral projection model
- Building an integral projection model - vital-rate regressions to a kernel to an eigenvalue.
- Eviction and mesh - two discretisation traps that bias lambda without warning.
- IPM sensitivity and elasticity - matrix perturbation analysis on a continuous kernel.
- Life expectancy and passage time - individual demography from the fundamental operator.
Joining the data sources
- Integrated population models from scratch - counts, marks and productivity in one likelihood, and what counts alone cannot split.
- Implicit information - the parameter the model estimates without data, and what it leans on.
- Demographic and environmental variance - splitting the two, and when the split is identifiable at all.
- Checking an integrated population model - finding the conflict between data sources that a good fit hides.
Where this connects
- Cormack-Jolly-Seber survival and Jolly-Seber and POPAN produce the survival and recruitment estimates an integrated model consumes.
- Detecting density dependence is the question a density-independent matrix assumes away.
- Fitting growth curves with nls is where the growth kernel of an IPM comes from.
- Ecological time series in R reads the same populations as a process through time rather than a life cycle.