Track Lizard Movement with a Capture-Recapture Model 

This example illustrates using a hidden Markov model to reconstruct the most probable lizard migration pattern, as well as estimate a lizard's expected lifespan from a sequence of incomplete trapping records.

Lizards move between three zones represented by states 2, 3, 4. When they die they transition into state 1. Each lizard is initially tagged.

At each time , 25 lizards are captured, each lizard's zone is recorded, and they are released. The recorded 1, 2, or 3 corresponds to an actual zone, while 4 represents a missing value that could mean that the lizard was not captured or that it is dead.

In[1]:=
Click for copyable input
X

Estimate a 4-state, 4-emission hidden Markov process from the data.

In[2]:=
Click for copyable input
X
Out[2]=

Find the most likely movement pattern for the first lizard.

In[3]:=
Click for copyable input
X
Out[3]=

In the preceding sequence the state 1, death, is an absorbing state.

In[4]:=
Click for copyable input
X
Out[4]=

The mean time to death.

In[5]:=
Click for copyable input
X
Out[5]=