Simulating movement from a recharge dynamics model #108
-
Hi Brett, I've been using your R package momentuHMM for simple movement simulations for a project I'm working on and it's been really great! I had some questions, I hope you don't mind. For consistency, I was looking to simulate more complex habitat-driven movement using the same package and wondering if what I'm envisioning is possible. Specifically, would it be possible to simulate from a recharge dynamics model to replicate the empirical movement patterns seen in Fig. 26 of this document (African buffalo example; https://cran.r-project.org/web/packages/momentuHMM/vignettes/momentuHMM.pdf)? What I'm looking for is for short, tortuous movement in resource areas (charged state) and for long, directed movements towards the nearest resource area in the recharge state. I've only managed this so far, For reference, here is the code I used:
Let me know if I need to provide more information. Many thanks in advance! Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The recharge model of Hooten et al is non-Markov (i.e. the probability of switching to the "charged" or "discharged" state is not dependent on the current state and is solely a function of the current value of the recharge function). The Orthogonalization of the recharge covariates is not necessary for simulation; this is more just a "trick" for better behavior during model fitting. I'd suggest skipping this step, in which case There is a lot of interplay between the parameters, covariates values (and the magnitude of their gradients), and spatial scale in this model. It therefore requires a fair bit tweaking to achieve the desired behavior. For example, if the "charged" state is just a simple random walk with short steps as described above, then an individual is likely to never leave the current patch (and its recharge function will "blow up" to a large positive value). Using your code with
Here is an example where the recharge function is more balanced, but the "charged" state is still just a simple random walk:
So here the recharge function is better behaved, but we don't get much movement between patches. But now if we were to add a potential function for the "charged" state that tends to move "charged" individuals away from patches:
So we now see some more movement among the patches and frequent switches between the "charged" and "discharged" states. Hopefully you can play around with this code and get a feel for the interplay between the movement models for the "charged" and "discharged" states, the covariates, and the model parameters. There are lots of other options for movement of the "charged" state, including adding correlated movement (via the |
Beta Was this translation helpful? Give feedback.
-
Hi Brett, This is fantastic and exactly what I was looking for. I'll keep playing around with what you've provided and try to add in more features (such as the crw). Thank you so much for the solutions and helpful explanations! Cheers, |
Beta Was this translation helpful? Give feedback.
The recharge model of Hooten et al is non-Markov (i.e. the probability of switching to the "charged" or "discharged" state is not dependent on the current state and is solely a function of the current value of the recharge function). The
beta=matrix(c(0,-1,0,-1),2,2)
constraints can be used to accomplish this, but they only make sense if the reference state is the same for the "charged" and "discharged" states. This can be done by settingbetaRef = c(1,1)
.Orthogonalization of the recharge covariates is not necessary for simulation; this is more just a "trick" for better behavior during model fitting. I'd suggest skipping this step, in which case
theta=~near_r
could be used in the recharg…