Multi-state model with memory

Forum for discussion of general questions related to study design and/or analysis of existing data - software neutral.

Multi-state model with memory

Hi All,

What I am asking may be beyond the realms of mark-recapture, but I couldn't find a similar question and I haven't succeeded in finding alternative options yet. At present, transitions in a multi-state model are generally based on where an individual is now (stratum) and where it is going (tostratum). What I would like to expand is where an individual was previously, and in this way estimate transitions that are more individual-specific, so for example lets say we have 10 strings, as per below, which represent two areas, and the transitions are summer-winter-summer

ABA
ABA
ABA
ABA
ABB
BBB
BBB
BBB
BBB
BBB

The estimate transitions for summer are a probability of 1 of stratum:tostratum A->B and also for B->B. For the winter transitions, they are 0.4 of stratum:tostratum B->A and 0.6 for B->B. But as you can see, there is more at play here. The residents (B) have a probability of 1 of remaining in B, whereas the migrants (came from A) have a 0.8 probability of going back to A, and a 0.2 of remaining in B. Hence the transitions depend on the time step prior to stratum:tostratum. Is there a way of bringing these dynamics into the transition models (I have 6 states and 10 years, thus 20 time steps) because in my system there is large variation in survival and resighting probabilities among states and hence why I would like to do this in a mark-recapture framework).

many thanks for your time in considering my question.
awan

Posts: 16
Joined: Fri Feb 10, 2017 10:52 am

Re: Multi-state model with memory

This should be posted in general analysis question section but I'll respond here. What you are describing is a second order Markov model or more generally a model with memory. Someone has published on the latter and I think there was software using MSSURVIV but can't recall any names at present. Jim Hines and others may know more. A second order Markov model is less complex and I have considered developing software for this model but in retirement it just hasn't happened. I have also been encouraging others to take on this task but as far as I know no one has. It would have general application for a lot of species like birds and whales that have seasonal migrations to a set of different areas but there is some level of fidelity to a seasonal. You are correct that what is available is a first order Markov model for multistate models. I suggest that you find the book Hidden Markov Models for Time Series: An Introduction Using R, Second Edition (Chapman & Hall/CRC Monographs on Statistics and Applied Probability) 2nd Edition
by Walter Zucchini (Author), Iain L. MacDonald (Author), Roland Langrock (Author). They have a section on second order HMMs.

You can also read a report I put together on application of HMMs to capture-recapture at
https://repository.library.noaa.gov/view/noaa/4571/noaa_4571_DS1.pdf?
jlaake

Posts: 1359
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Multi-state model with memory

The paper by Brownie et al. describes the memory model:
Brownie, C., et al. (1993). "Capture-Recapture Studies for Multiple Strata Including Non-Markovian Transitions." Biometrics 49(4): 1173–1187.

JIm Hines is the person to talk with about whether it has ever been coded.

Gary
gwhite

Posts: 321
Joined: Fri May 16, 2003 9:05 am

Re: Multi-state model with memory

There are several packages in R that handle hidden Markov models. I have not explored them much but many assume a parametric distribution and not apparent how to apply directly to capture-recapture data.
jlaake

Posts: 1359
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Multi-state model with memory

jlaake wrote:There are several packages in R that handle hidden Markov models. I have not explored them much but many assume a parametric distribution and not apparent how to apply directly to capture-recapture data.

MS-SURVIV (a Jim Hines production) has 'first-order memory models' as one of its capabilities. MS-SURVIV is a permutation of SURVIV (a Gary White production), which is set up for multi-state analysis. Since many non-MS models can be set up as a MS problem with unobservable states (e.g., CJS is a MS model with one observable state, live, and one unobservable state, dead), then MS-SURVIV is pretty flexible. More generally flexible for MS problems is M-SURGE (a Remi Choquet production).

For the full-blown treatment of hidden states, unobservable states etc, by far your best option is E-SURGE (also a Choquet production). See various papers about E-SURGE (including those by Roger Pradel and Olivier Gimenez). Some of the 'hidden Markov' estimation capabilities are coded into MARK (ideas from Bill Kendall, coding as always by Gary), but other than a couple of Kendall et al. papers, is not documented anywhere (we'll blame the 'Gentle Introduction' authors for that oversight).

My two cents -- if it were me, and I was starting from scratch, I'd look at E-SURGE. [In fact, Paul Conn and I made just that decision for some stuff we worked on together several years back. We could have wrestled R to do it, but why re-invent the wheel if the wheel already existed for 'mark-recapture' type data.]
cooch

Posts: 1604
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Multi-state model with memory

Does ESurge do second or higher order Markov models? It was my impression that it was only first order. Maybe something to post on ESurge forum.
jlaake

Posts: 1359
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Multi-state model with memory

jlaake wrote:Does ESurge do second or higher order Markov models? It was my impression that it was only first order. Maybe something to post on ESurge forum.

Yes, if I recall correctly, but....higher order hidden-state Markov models are *very* data hungry. If someone had a very high detection probability, might be possible - but even second-order models are pretty 'data greedy'.
cooch

Posts: 1604
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Multi-state model with memory

I can believe that because you are essentially squaring the transition matrix dimension but they can be simplified to encapsulate the essential features whereby you are more likely to return to same area but some possibly constant probability of straying. A literature search seems worthwhile and posting on ESurge forum for an example of a second order model. As I said this has broad application to seasonal migrant populations.
jlaake

Posts: 1359
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Multi-state model with memory

Dear all, thank you all for the helpful discussion and pointers. I will certainly be following up on the different options. I had indeed come across the HMMs in various R packages but I couldn't see a way to apply this to mark-recapture data. The tips really help me for finding a route to dig further.

In case you are curious, the data I hope to build the model is from oystercatchers in the Netherlands. We are working with 5 summer states, 3 winter states and an unobservable (abroad) state. Detection probabilities range from lowest being 0.4 with a few states having as high as 0.8. The latest model I tried running had over 10,000 individuals, with different starting ages (as you can imagine, (R)Mark wasn't so happy about the data being fed to it). Ultimately the migratory transition parameters will be fed into a migratory network population model (all going to plan ).
awan

Posts: 16
Joined: Fri Feb 10, 2017 10:52 am

Re: Multi-state model with memory

I'm a bit confused about your comment that RMark was not happy about the magnitude of the data that you have. That number of strata should not have caused a problem unless you have many many years of data and even then you could have used pim.type="time" to reduce the dimensions of the Psi design data. Were you actually trying the marked R package and just mistaken in your naming. I could then see that would be a problem because of the number of individual histories since it doesn't use Pims.

Jeff
jlaake

Posts: 1359
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Next