class: center, middle, inverse, title-slide # Statistical methods for movement ecology ### Marie-Pierre Etienne ### 2022 --- name: intro <!-- F1D763 --> <!-- F7A913 --> <!-- C94326 --> <!-- 1F908E --> <!-- 33658A --> <!-- # Why do I enjoy research in statistics ? --> <!-- -- --> <!-- <div class= "addspace"> --> <!-- <li> Working with researchers from different background,</li> --> <!-- </div> --> <!-- <div class= "addspace"> --> <!-- <li> Never left the school system, </li> --> <!-- </div> --> <!-- <div class= "addspace"> --> <!-- <li> Continnuously learning new concepts, methods, tools </li> --> <!-- </div> --> <!-- <div class= "addspace"> --> <!-- <li> being confortable with my inside geek part. </li> --> <!-- </div> --> # Movement ecology paradigm <img class="logopos_right" src="compute.png" style="height:6%"> <img class="logopos_left" src="paw.png" style="height:7%"> ## <a name=cite-nathan2008movement></a>([Nathan, Getz, Revilla, et al., 2008](#bib-nathan2008movement)) presents individual movement as the results of .pull-left[ <figure> <img src="nathan_fig.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> </figure> .legend[ Movement drivers by [Nathan, Getz, Revilla, et al. (2008)](#bib-nathan2008movement) ] ] .pull-right[ * Motion capacities * Internal state * Environment ] -- .question[Movement informs on internal states and habitat preferences] --- name: move2data # From Movement to Movement data -- .pull-left[ <figure> <img src="path_1.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> </figure> ] --- template: move2data count: false .pull-left[ <figure> <img src="path_2.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> </figure> ] --- template: move2data count: false .pull-left[ <figure> <img src="path_3.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> </figure> ] --- template: move2data count: false .pull-left[ <figure> <img src="path_p3.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> </figure> ] -- .pull-right[ A continuous process sampled at some discrete potentially irregular times. Time series with values in `\(\mathbb{R}^2\)` (on earth ...). `$$\begin{array}\\ \mbox{Time} & \mbox{Location} & \mbox{Turning angle} & \mbox{Speed}\\ t_{0} & (x_0, y_0) & NA & NA\\ t_{1} & (x_1, y_1) & NA & sp_1\\ t_{2} & (x_2, y_2) & ang_2 & sp_2\\ \vdots & \vdots& \vdots& \vdots \\ t_{n} & (x_n, y_n) & ang_n & sp_n\\\\ \end{array}$$` ] --- # Ecological questions .pull-left[ ## Behavioural ecology <figure> <img src="traj_seg_booby_black.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Peruvian booby data courtesy of Sophie Bertrand] </figure> ] --- # Ecological questions .pull-left[ ## Behavioural ecology <figure> <img src="traj_seg_booby.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Peruvian booby data courtesy of Sophie Bertrand] </figure> ] -- .pull-right[ ## Habitat preference <figure> <img src="SSL_covs.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> .legend[Sea Lions habitat description] </figure> ] --- name: data2model # From Movement Data to Movement Model -- Often analysed using discrete time model <a name=cite-mcclintock2014discrete></a>([McClintock, Johnson, Hooten, et al., 2014](#bib-mcclintock2014discrete)) -- <figure> <img src="move_decomposition.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Movement decomposition] </figure> --- # Segmentation ## Heterogeneity in movement pattern interpretated as different internal states .pull-left[ <figure> <img src="traj_seg_booby.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Peruvian booby data courtesy of Sophie Bertrand] </figure> ] .pull-right[ ## Accounting for internal states Classically addressed with Hidden Markov Model ### Exploring the change point detection approach. <a name=cite-lavielle2005using></a><a name=cite-picard2007segmentation></a>([Lavielle, 2005](#bib-lavielle2005using); [Picard, Robin, Lebarbier, et al., 2007](#bib-picard2007segmentation)) ] --- # Segmentation ## Signal processing approach for movement ecology ([Picard, Robin, Lebarbier, et al., 2007](#bib-picard2007segmentation)) .pull-left[ <figure> <img src="segmentation.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Change point detection <a name=cite-patin2019identifying></a>([Patin, Etienne, Lebarbier, et al., 2019](#bib-patin2019identifying))] </figure> Let `\(\boldsymbol{\tau}={\tau_1,...,\tau_{K-1}}\)` ( `\(\tau_0=-1\)` ) be a partition in K segments of `\(\{1,\ldots n\}\)` `$$\boldsymbol{X}_{i}\overset{i.i.d}{\sim}\mathcal{L}(\theta_k),\quad \forall i \in \{ \tau_{k-1}+1:\tau_k \}$$` The .care[Dynamic Programming algorithm] allows to explore efficiently all possible segmentation and to estimate `\(\boldsymbol{\hat{\tau}}\)` ] -- .pull-right[ <figure> <img src="seg_classification.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Change point detection and classification ([Patin, Etienne, Lebarbier, et al., 2019](#bib-patin2019identifying))] </figure> Let `\(Z_k\)` stand for the class of segment `\(k,\)` `\(\forall i \in \{ \tau_{k-1}+1:\tau_k \}\)` `$$Z_k \overset{i.i.d}{\sim} \mathcal{M}(\pi), \quad\boldsymbol{X}_{i}\vert Z_k=l \overset{i.i.d}{\sim}\mathcal{L}(\theta_l)$$` The Dynamic Programming coupled with EM algorithm allows to explore efficiently all possible segmentation and to estimate `\(\boldsymbol{\hat{\tau}}\)` ] -- In ([Patin, Etienne, Lebarbier, et al., 2019](#bib-patin2019identifying)) : a direct extension to simultaneous segmentation for home range shift. --- # Segmentation ## Signal processing approach for movement ecology ([Lavielle, 2005](#bib-lavielle2005using); [Picard, Robin, Lebarbier, et al., 2007](#bib-picard2007segmentation)) .pull-left[ <figure> <img src="segmentation.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Change point detection ([Patin, Etienne, Lebarbier, et al., 2019](#bib-patin2019identifying))] </figure> ] .pull-right[ <figure> <img src="seg_classification.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> .legend[Change point detection and classification ([Patin, Etienne, Lebarbier, et al., 2019](#bib-patin2019identifying))] </figure> ] .question[Movement path is more than time series, importance of considering the space.] -- .center[.care[Proposing ecologically meaningful movement models]] Pros and cons of Discrete time versus continuous time movement models discussed in [McClintock, Johnson, Hooten, et al. (2014)](#bib-mcclintock2014discrete) --- # Potential based Diffusions as continuous time movement model Let `\((X_s)_{s\geq0}\in\mathbb{R}^2\)` denote the position at time `\(s\)`. .pull-left[ * Brownian motion: a pure diffusion model `$$dX_s = dW_s, \quad X_0=x_0.$$` <figure> <img src="bm.png" alt="at the beginning is" style="width:60%" class = "centerimg" /> </figure> ] -- .pull-left[ * Ornstein Uhlenbeck process: central place behavior `$$dX_s = -B (X_s- \mu) ds + dW_s, \quad X_0=x_0.$$` <figure> <img src="ou.png" alt="at the beginning is" style="width:60%" class = "centerimg" /> </figure> ] Popular models as Brownian Motion and Ornstein Uhlenbeck have known transition densities `\(q(x_t, x_{t+s})\)` which is not the case in general. --- # Potential based Diffusions as continuous time movement model <a name=cite-brillinger2002employing></a>[Brillinger, Preisler, Ager, et al. (2002)](#bib-brillinger2002employing) propose a flexible framework `$$dX_s = -\nabla H(X_s) ds + \gamma dW_s, \quad X_0=x_0.$$` but no explicit transitions `\(q(x_t, x_{t+s})\)` -- In <a name=cite-Gloaguen2018stochastic></a>[Gloaguen, Etienne, and Le Corff (2018a)](#bib-Gloaguen2018stochastic), as part of *P. Gloaguen's PhD*, explore `\(H(X_s) = \sum_{k=1}^K \pi_k \varphi_k(X_s),\)` .pull-left[ <figure> <img src="map2.png" alt="at the beginning is" style="width:90%" class = "centerimg" /> </figure> ] -- .pull-right[ * Euler approximation : biased estimates with low frequency data * <a name=cite-ozaki1992bridge></a>([Ozaki, 1992](#bib-ozaki1992bridge)) and <a name=cite-kessler1997estimation></a>[Kessler (1997)](#bib-kessler1997estimation) same results than * MCEM based on exact simulation <a name=cite-beskos2006exact></a>([Beskos, Papaspiliopoulos, Roberts, et al., 2006](#bib-beskos2006exact)) limits the flexibility of the SDE. ] --- # Potential based Diffusions as continuous time movement model <img class="logopos_right" src="compute.png" style="height:6%"> <img class="logopos_left" src="paw.png" style="height:7%"> ## Partially observed SDE .pull-lefts[ <img src="path_4.png" alt="at the beginning is" style="width:70%" class = "centerimg" /> ] -- .pull-rights[ Let `\(Y_k\)` be the recorded position `\(s_k\)`, a noisy observation of the true position `\(X_k\)`: `$$dX_s = b(X_s) ds + \gamma dW_s, \quad X_0=x_0; \quad Y_k \overset{ind}{\sim} \mathcal{L} (X_k, \theta{o}).$$` ] -- ### Additive smoothing distributions for the E Step `$$\sum_{k=0}^{n-1}\mathbb{E}( h(X_k, X_{k+1}) \vert Y_{0:n})$$` -- * The particle-based, rapid incremental smoother (PaRIS) algorithm <a name=cite-olsson2017efficient></a>([Olsson and Westerborn, 2017](#bib-olsson2017efficient)) provides an online smoother using a rewriting of the Backward weight and an acceptation/rejection mechanism but depends on `\(q(\xi_{k-1}, \xi_{k})\)` * The generalized random PaRIS algorithm, in <a name=cite-gloaguen2018online></a>([Gloaguen, Etienne, and Le Corff, 2018b](#bib-gloaguen2018online)), uses simple Euler approximation to propose the particles and uses a General Poisson Estimator to replace `\(q(\xi_{k-1}, \xi_{k})\)` with an unbiased estimator. -- .care[Restrictive constraints on the drift and the diffusion term], are relaxed in <a name=cite-martin2021backward></a>([Martin, Etienne, Gloaguen, et al., 2021](#bib-martin2021backward)). --- # Potential based Diffusions as continuous time movement model ## Flexible movement model for habitat preference <figure> <img src="DAG1.png" alt="at the beginning is" style="width:80%" class = "centerimg" /> </figure> --- # Potential based Diffusions as continuous time movement model ## Flexible movement model for habitat preference <figure> <img src="DAG2.png" alt="at the beginning is" style="width:80%" class = "centerimg" /> .legend[Flexible movement model which accounts for environment] </figure> <!-- --- --> <!-- template: movement --> <!-- ## Flexible movement model --> <!-- <figure> --> <!-- <img src="DAG3.png" alt="at the beginning is" style="width:80%" class = "centerimg" /> --> <!-- <figcaption> Flexible non homogeneous movement model</figcaption> --> <!-- </figure> --> --- # Potential based Diffusions as continuous time movement model ## Flexible movement model for habitat preference A classical choice of **resource selection function**, (i.e stationary distribution including covariates) $$\pi{\left(x \vert \beta\right)} \varpropto \exp\left(\sum_{j=1}^J \beta_j c_j (x) \right). $$ Diffusion, under regularity condition admits a stationary distribution. -- Combining the ideas of <a name=cite-michelot2019linking></a>([Michelot, Blackwell, and Matthiopoulos, 2019](#bib-michelot2019linking)), and ([Brillinger, Preisler, Ager, et al., 2002](#bib-brillinger2002employing)) lead to the Langevin diffusion as movement model, $$ d X_t = \frac{\gamma^2}{2} \nabla \log \pi{\left(X_t\right)} \, d t + \gamma \,d W_t,\quad X_0 =x_0. $$ -- Using Euler approximation `$$ X_{i+1} \vert \lbrace X_i = x_i \rbrace = x_i + \frac{\gamma^2 \Delta_i}{2} \sum_{j=1}^J \beta_j \nabla c_j(x_i) + \sqrt{\Delta_i} \varepsilon_{i+1},\quad \varepsilon_{i+1} \overset{ind}{\sim} N \left( {0} , \gamma^2 \boldsymbol{I}_d \right),$$` leads to a simple linear model published in <a name=cite-michelot2019langevin></a>[Michelot, Etienne, Blackwell, et al. (2019)](#bib-michelot2019langevin). --- --- # Potential based Diffusions as continuous time movement model ## Flexible movement model for habitat preference .pull-left[ <figure> <img src="SSL_covs.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> .legend[Sea Lions habitat description] </figure> ] -- .pull-right[ <figure> <img src="SSL_logUD.png" alt="at the beginning is" style="width:100%" class = "centerimg" /> .legend[Sea Lions habitat description] </figure> ] --- # Perspectives ### Some natural extension of the Langevin model useful in movement ecology * Coupling Hidden Markov model or change point detection model with a Langevin distribution: <figure> <img src="DAG4.png" alt="at the beginning is" style="width:60%" class = "centerimg" /> </figure> * Introduction of an individual random effect, ### Handling categorical covariates <a name=cite-lejay2018maximum></a>[Lejay and Pigato (2018)](#bib-lejay2018maximum) define a threshold diffusion and proposes an ML estimation method. Explore the generalisation to `\(\mathbb{R}^2\)`. ### Longer term perspective * Collective movement: Cheaper GPS imply massive deployment. Invest the area of collective movement analysis. * Combined sound monitoring --- # A few words to finish * Close interaction with biologist, - it's helpful, - provides exciting statistical problems, - experiment a large diversity of approaches. * Hidden variables approach - provide flexible models (spatial abundance, classification in time series, Partially observed SDE) - popularized in Ecology in a Bayesian setting but frequentist approach is also possible * The Markovian property - not so realistic, - but a key component in both theoretical approach and computational aspects --- class: biblio # Bibliography <img class="logopos_right" src="article.png" style="height:6%"> <a name=bib-beskos2006exact></a>[Beskos, A., O. Papaspiliopoulos, G. O. Roberts, et al.](#cite-beskos2006exact) (2006). "Exact and computationally efficient likelihood-based estimation for discretely observed diffusion processes (with discussion)". In: _Journal of the Royal Statistical Society: Series B (Statistical Methodology)_ 68.3, pp. 333-382. <a name=bib-brillinger2002employing></a>[Brillinger, D. R., H. K. Preisler, A. A. Ager, et al.](#cite-brillinger2002employing) (2002). "Employing stochastic differential equations to model wildlife motion". In: _Bulletin of the Brazilian Mathematical Society_ 33.3, pp. 385-408. <a name=bib-gloaguen2018online></a>[Gloaguen, P., M. Etienne, and S. Le Corff](#cite-gloaguen2018online) (2018b). "Online sequential Monte Carlo smoother for partially observed diffusion processes". In: _EURASIP Journal on Advances in Signal Processing_ 2018.1, p. 9. <a name=bib-Gloaguen2018stochastic></a>[Gloaguen, P., M. Etienne, and S. Le Corff](#cite-Gloaguen2018stochastic) (2018a). "Stochastic differential equation based on a multimodal potential to model movement data in ecology". In: _Journal of the Royal Statistical Society: Series C (Applied Statistics)_ 67.3, pp. 599-619. DOI: [10.1111/rssc.12251](https://doi.org/10.1111%2Frssc.12251). <a name=bib-kessler1997estimation></a>[Kessler, M.](#cite-kessler1997estimation) (1997). "Estimation of an ergodic diffusion from discrete observations". In: _Scandinavian Journal of Statistics_ 24.2, pp. 211-229. <a name=bib-lavielle2005using></a>[Lavielle, M.](#cite-lavielle2005using) (2005). "Using penalized contrasts for the change-point problem". In: _Signal processing_ 85.8, pp. 1501-1510. <a name=bib-lejay2018maximum></a>[Lejay, A. and P. Pigato](#cite-lejay2018maximum) (2018). "Maximum likelihood drift estimation for a threshold diffusion". In: _Scandinavian Journal of Statistics_. --- class: biblio count: false # Bibliography <img class="logopos_right" src="article.png" style="height:6%"> <a name=bib-martin2021backward></a>[Martin, A., M. Etienne, P. Gloaguen, et al.](#cite-martin2021backward) (2021). "Backward importance sampling for online estimation of state space models". working paper or preprint. URL: [https://hal.archives-ouvertes.fr/hal-02476102](https://hal.archives-ouvertes.fr/hal-02476102). <a name=bib-mcclintock2014discrete></a>[McClintock, B. T., D. S. Johnson, M. B. Hooten, et al.](#cite-mcclintock2014discrete) (2014). "When to be discrete: the importance of time formulation in understanding animal movement". In: _Movement Ecology_ 2.1, p. 21. <a name=bib-michelot2019linking></a>[Michelot, T., P. G. Blackwell, and J. Matthiopoulos](#cite-michelot2019linking) (2019). "Linking resource selection and step selection models for habitat preferences in animals". In: _Ecology_ 100.1. <a name=bib-michelot2019langevin></a>[Michelot, T., M. Etienne, P. Blackwell, et al.](#cite-michelot2019langevin) (2019). "The Langevin diffusion as a continuous-time model of animal movement and habitat selection". In: _Methods in Ecology and Evolution_. <a name=bib-nathan2008movement></a>[Nathan, R., W. M. Getz, E. Revilla, et al.](#cite-nathan2008movement) (2008). "A movement ecology paradigm for unifying organismal movement research". In: _Proceedings of the National Academy of Sciences_ 105.49, pp. 19052-19059. <a name=bib-olsson2017efficient></a>[Olsson, J. and J. Westerborn](#cite-olsson2017efficient) (2017). "Efficient particle-based online smoothing in general hidden Markov models: the PaRIS algorithm". In: _Bernoulli_ 23.3, pp. 1951-1996. <a name=bib-ozaki1992bridge></a>[Ozaki, T.](#cite-ozaki1992bridge) (1992). "A bridge between nonlinear time series models and nonlinear stochastic dynamical systems: a local linearization approach". In: _Statistica Sinica_, pp. 113-135. --- class: biblio count: false # Bibliography <img class="logopos_right" src="article.png" style="height:6%"> <a name=bib-patin2019identifying></a>[Patin, R., M. Etienne, E. Lebarbier, et al.](#cite-patin2019identifying) (2019). "Identifying stationary phases in multivariate time series for highlighting behavioural modes and home range settlements". In: _Journal of Animal Ecology_. <a name=bib-picard2007segmentation></a>[Picard, F., S. Robin, E. Lebarbier, et al.](#cite-picard2007segmentation) (2007). "A segmentation/clustering model for the analysis of array CGH data". In: _Biometrics_ 63.3, pp. 758-766.