## Introduction

Demography underpins many contemporary challenges in ecology. From understanding species' distributions to the fate of biodiversity under climate change, demography links the processes that affect individuals to population- and community-level patterns (e.g. Adler, Ellner & Levine 2010). Integral projection models (IPMs; Easterling, Ellner & Dixon 2000) have emerged as a powerful tool for quantifying how the vital rates of individuals (i.e. survival, growth and fecundity) govern such higher-level properties, partly because they rely on the flexibility and simplicity of regression models. IPMs provide a mechanistic approach to understanding and linking biological processes across scales, which permits evaluation of the biological plausibility of models at each step of the analysis to make robust predictions (Fig. 1).

Building IPMs typically begins by obtaining longitudinal data describing individuals' vital rates. The minimum data required for an IPM consists of two censuses of individual state and fate (typically for estimation of survival and growth and optionally fecundity; Appendix S1-S7). The fundamental building blocks of IPMs are regression models that relate the state of an individual (e.g. size, age and location) to its vital rates. The regressions may also include additional biotic or abiotic covariates that explain variation in vital rates beyond the effects of individual state (Appendix S1,F; Dahlgren & Ehrlén 2009; Adler, Ellner & Levine 2010; Dalgleish *et al*. 2011; Nicolè *et al*. 2011). In this way, IPMs can link observations of an individual (Fig. 1a) to variation in vital rates among individuals (Fig. 1b) to project population dynamics (Fig. 1c) and emergent biological patterns such as fitness landscapes (Appendix S1,G) or range limits (Appendix S1,F; Fig. 1d).

Previous work has highlighted some of the strengths of IPMs as they compare to matrix population models (MPMs; cf. Caswell 2001; Easterling, Ellner & Dixon 2000; Ellner & Rees 2006; Coulson 2012; Ozgul *et al*. 2012). A primary difference between the two frameworks is that MPMs assume that individuals occupy discrete stages, whereas IPMs naturally accommodate both discrete and continuous state variables (e.g. Childs *et al*. 2003; Jacquemyn, Brys & Jongejans 2010; Yule, Miller & Rudgers 2013). For some organisms, it is natural to divide the life cycle into discrete components (e.g. insects with particular instars), but for many others using a continuous state variable is more appropriate (e.g. size). The artificial discretization imposed by MPMs can have substantial effects on demographic predictions because it ignores variability among individuals within each stage (Easterling, Ellner & Dixon 2000; Salguero Gómez & Plotkin 2010). IPMs are usually parameterized with simple regressions, whereas MPMs typically estimate probabilities from observed transitions (but see Morris & Doak 2002). The vital rate regressions that underlie IPMs require many fewer parameters than MPMs when fitted to the same data (Ellner & Rees 2006; Ramula, Rees & Buckley 2009). For example, rather than estimating multiple matrix elements corresponding to stasis, shrinkage and growth (e.g. Evans, Holsinger & Menges 2010), one can fit a single regression for these dynamics. Such regressions can avoid overfitting to sparsely sampled transitions (Ramula, Rees & Buckley 2009; Dahlgren, García & Ehrlén 2011). Regression modelling allows vital rates to be estimated at any value of the state variable, which allows IPMs to describe state transitions at very high resolution. IPM predictions are thus only as good as the parametric assumptions and inferred transitions from vital rate regressions.

Here, we emphasize how IPMs enable mechanistic insight into population-level patterns by modelling the ecological factors influencing vital rates. We attempt to make applications of IPMs to ecology and evolution, specifically more complex examples, more transparent. There is a growing body of work on IPMs in animal populations (e.g. Coulson, Tuljapurkar & Childs 2010; Ozgul *et al*. 2010; Coulson 2012), but here, we focus on building IPMs for plants and note that our discussion readily applies to other organisms. To do this, we describe how to build each component of an IPM for a series of increasingly complex life histories and provide extensive R code (R Core Team 2013) for a series of case studies in seven appendices. We discuss diagnostic tools for IPMs and provide advice for building biologically complex IPMs.