Post provided by Richard P. Shefferson, University of Tokyo
Matrix projection has become widely used by population ecologists to analyze and predict the behavior of wild populations of plants and animals… and sometimes even other, odder organisms (Salguero-Gómez et al. 2015; Salguero‐Gómez et al. 2016). Over the last few decades, the size and complexity of these models have increased dramatically, with matrix dimensions now ranging from as few as two rows and columns to tens of thousands (Shefferson 2022). Matrix styles are no longer limited to Leslie and Lefkovitch matrices, which were first created over 80 years ago (Leslie 1945), but also include age-by-stage matrices (Caswell et al. 2018), historical matrices (Ehrlén 2000), and discretized IPMs (Easterling et al. 2000).
Along with this increasing size and complexity, the kinds of applications that matrix projection are used for has also increased. For me, the most interesting uses have been those involving multiple matrix population models connected one to another via density dependence relationships. Two such uses stand out. First, evolutionary ecologists have begun to use such approaches to understand or predict evolutionary outcomes via adaptive dynamics (Metcalf et al. 2003; Shefferson et al. 2014). Applying matrix projection to adaptive dynamics involves the development of suites of MPM or IPM variants that represent genetic mutants and must compete against each other, all based on the same original MPM or IPM. In the most common analysis, termed pairwise invasibility analysis, all possible variants are tested in all possible pairwise permutations, with one acting as a resident population that is allowed to develop a population at peak density, and another introduced later as an invading mutant (Roff 2010). The fitness of the invading mutant is then monitored and used to assess trait optima and speciation dynamics.
Second, community ecologists have begun to use matrix projections to assess how populations influence community characteristics and dynamics, under the assumption of inter-population interaction. In these matrix community models (MCMs), multiple, independent MPMs or IPMs are created, and are then linked via density dependence affecting matrix elements against a common community density (Lytle & Tonkin 2023). The main assumption in these studies is that density reflects some form of competition. Published work includes both plant examples and animal examples (Lytle et al. 2017; Rogosch et al. 2019; Zhang et al. 2025).
As applications such as these have developed, the burden on computing power has increased dramatically such that many ecologists now use virtual parallel systems such as Amazon’s EC2 and Azure, and sometimes wait weeks for analyses to finish. R package adapt3 was developed to simplify and speed up these new uses of matrix projection. It allows evolutionary ecologists interested in using matrix projection for adaptive dynamics, and community ecologists interested in using matrix community models to understand communities or their constituent populations, to conduct these analyses relatively simply with a lower burden of required computing power. The core matrix development burden is now handled through package lefko3 (Shefferson 2022; Shefferson et al. 2021), which simplifies the production of large, complex MPMs such as historical or age-by-stage MPMs (in addition to simpler models such as discretized IPMs, Leslie MPMs, and Lefkovitch MPMs). It also provides tools for import, both for matrices and for statistical models that can be used by adapt3 to create matrices on the fly. It then creates the core programming structures and binaries that link these MPMs and run them, with tools also supplied to visualize and summarize the results.
Package adapt3 comes with two real examples designed to reproduce published results. First, I provide an example originally published in Journal of Ecology over 10 years ago in which matrix projection is used to run a pairwise invasibility analysis to assess whether vegetative dormancy is an evolutionary stable strategy in a long-lived orchid, Cypripedium parviflorum (Shefferson et al. 2014, Figure 1). That analysis used real demographic data to find evidence that vegetative dormancy acts as a purely adaptive trait, with natural selection favoring an optimal, intermediate value of sprouting that yields vegetative dormancy particularly when the plant is small or growing quickly. The data from that analysis is provided in the package. While the code for the original analysis was not published with the paper at the time, package adapt3 simplifies the code dramatically, shortening the length of code for comparable analyses from roughly 8000-9000 lines to roughly 200 lines.

Second, I provide an example in which a matrix community model is developed and projected to infer how a riparian plant community from the Great Basin, USA, should respond to a warming, drying climate (Lytle et al. 2017). Five plant guilds are modeled in that example, with the guilds represented by core species, such as the dominant cottonwood trees and tamarisk shrub. The example includes an analysis predicting a shift in dominance toward xerophytic plants as the climate dries, and also includes sensitivity analyses showing how small changes in matrix elements in one MPM affects population and community properties across the entire matrix community model.
Adaptive dynamics and matrix community models are cutting edge techniques in ecology, and should be of interest to ecologists working at the forefront of today’s conceptual and practical problems. I particularly believe that they will be invaluable to help conservation and evolutionary ecologists predict ecological and evolutionary outcomes under climate change and under threats of emerging disease. Hopefully package adapt3 will also encourage further methodological advances, driving further insights in evolutionary and community ecology.
Read the full article here.
Literature Cited
Caswell, H., Vries, C. de, Hartemink, N., Roth, G. & Daalen, S.F. van. (2018). Age × stage-classified demographic analysis: a comprehensive approach. Ecol. Monogr., 88, 560–584.
Easterling, M.R., Ellner, S.P. & Dixon, P.M. (2000). Size-specific sensitivity: applying a new structured population model. Ecology, 81, 694–708.
Ehrlén, J. (2000). The dynamics of plant populations: does the history of individuals matter? Ecology, 81, 1675–1684.
Leslie, P.H. (1945). On the use of matrices in certain population mathematics. Biometrika, 33, 183–212.
Lytle, D.A., Merritt, D.M., Tonkin, J.D., Olden, J.D. & Reynolds, L.V. (2017). Linking river flow regimes to riparian plant guilds: a community-wide modeling approach. Ecol. Appl., 27, 1338–1350.
Lytle, D.A. & Tonkin, J.D. (2023). Matrix community models for ecology and evolution. Npj Biodivers., 2, 26.
Metcalf, J.C., Rose, K.E. & Rees, M. (2003). Evolutionary demography of monocarpic perennials. Trends Ecol. Evol., 18, 471–480.
Roff, D.A. (2010). Modeling evolution: an introduction to numerical methods. Oxford University Press, Oxford, England, United Kingdom.
Rogosch, J.S., Tonkin, J.D., Lytle, D.A., Merritt, D.M., Reynolds, L.V. & Olden, J.D. (2019). Increasing drought favors nonnative fishes in a dryland river: evidence from a multispecies demographic model. Ecosphere, 10, e02681.
Salguero‐Gómez, R., Jones, O.R., Archer, C.R., Bein, C., Buhr, Farack, C., et al. (2016). COMADRE: a global data base of animal demography. J. Anim. Ecol., 85, 371–384.
Salguero-Gómez, R., Jones, O.R., Archer, C.R., Buckley, Y.M., Che-Castaldo, J., Caswell, H., et al. (2015). The Compadre Plant Matrix Database: an open online repository for plant demography. J. Ecol., 103, 202–218.
Shefferson, R.P. (2022). lefko3: a gentle introduction. Posit Connect.
Shefferson, R.P., Kurokawa, S. & Ehrlén, J. (2021). lefko3: analysing individual history through size-classified matrix population models. Methods Ecol. Evol., 12, 378–382.
Shefferson, R.P., Warren II, R.J. & Pulliam, H.R. (2014). Life history costs make perfect sprouting maladaptive in two herbaceous perennials. J. Ecol., 102, 1318–1328.
Zhang, M., Zhao, C., Zhu, J., Han, W. & Jiang, W. (2025). Simulating responses of riparian ecosystem network complexity to flow regime shifts in arid regions. Ecol. Indic., 170, 113039.