Data

(Source: Morales & al, 2004, Ecology)

\(T = 214\) locations (‘Easting’, ‘Northing’ in km) of an elk collected every day: \[ P_t = (P^1_t, P^2_t) = \text{location of the animal on day $t$} \]

##     Easting Northing dist_water
## 518 777.410 4992.481      50.00
## 519 776.940 4992.261     424.26
## 520 777.097 4992.512     300.00
## 521 777.022 4992.257     471.70
## 522 776.687 4990.604     276.13
## 523 776.878 4990.676     182.00

Mouvement and speed

Speed of the animal on day \(t\) = distance traveled on day \(t\) (in log10 scale): \[ Y_t = \log_{10} \|P_t - P_{t-1}\| \]

Hidden Markov model

Aim: Distinguish between different regimes of move (behaviors) along time.

Model

  • \(Z_t =\) hidden state (= behavior) on day \(t\): \[ Z = (Z_t)_{t \geq 1} \sim MC(\nu, \pi) \]
  • \(Y_t =\) observed (log)speed on day \(t\): \(\{Y_t\}_{t \geq 1} \text{indep.} \mid Z\) \[ (Y_t \mid Z_t = k) \sim \mathcal{LN}(\mu_k, \sigma^2_k) \qquad \Leftrightarrow \qquad (\log Y_t \mid Z_t = k) \sim \mathcal{N}(\mu_k, \sigma^2_k). \]

Model selection

## converged at iteration 1 with logLik: -238.1488 
## converged at iteration 34 with logLik: -217.3594 
## converged at iteration 101 with logLik: -199.1833 
## converged at iteration 124 with logLik: -185.983 
## converged at iteration 115 with logLik: -171.2619
##              1         2         3         4         5
## df      2.0000    7.0000   14.0000   23.0000   34.0000
## logL -238.1488 -217.3594 -199.1833 -185.9830 -171.2619
## BIC  -243.5287 -236.1890 -236.8426 -247.8518 -262.7201

Model fit

## converged at iteration 16 with logLik: -217.5029

HMM classification

##      vit00
## map00   1   2
##     1 169   0
##     2   1  47

Hidden Markov model with covariate

Covariates for the transitions

## converged at iteration 98 with logLik: -205.1755
## Initial state probabilities model 
## pr1 pr2 
##   0   1 
## 
## Transition model for state (component) 1 
## Model of type multinomial (mlogit), formula: ~dist_water
## Coefficients: 
##             St1       St2
## (Intercept)   0  67.86921
## dist_water    0 -52.64144
## Probalities at zero values of the covariates.
## 3.347921e-30 1 
## 
## Transition model for state (component) 2 
## Model of type multinomial (mlogit), formula: ~dist_water
## Coefficients: 
##             St1       St2
## (Intercept)   0  36.70694
## dist_water    0 -38.90688
## Probalities at zero values of the covariates.
## 1.143869e-16 1 
## 
## 
## Response parameters 
## Resp 1 : gaussian 
##     Re1.(Intercept) Re1.sd
## St1          -1.110  0.860
## St2          -0.318  0.559

Covariates for the emissions

## converged at iteration 37 with logLik: -194.9703
## Initial state probabilities model 
## pr1 pr2 
##   0   1 
## 
## Transition matrix 
##         toS1  toS2
## fromS1 0.867 0.133
## fromS2 0.021 0.979
## 
## Response parameters 
## Resp 1 : gaussian 
##     Re1.(Intercept) Re1.dist_water Re1.sd
## St1           1.175         -2.320  0.336
## St2          -0.353         -0.154  0.582

Covariates for the both

## converged at iteration 71 with logLik: -193.8984
## Initial state probabilities model 
## pr1 pr2 
##   1   0 
## 
## Transition model for state (component) 1 
## Model of type multinomial (mlogit), formula: ~dist_water
## Coefficients: 
##             St1         St2
## (Intercept)   0 -3.75950298
## dist_water    0 -0.07191943
## Probalities at zero values of the covariates.
## 0.977235 0.022765 
## 
## Transition model for state (component) 2 
## Model of type multinomial (mlogit), formula: ~dist_water
## Coefficients: 
##             St1       St2
## (Intercept)   0 0.3591445
## dist_water    0 2.3955662
## Probalities at zero values of the covariates.
## 0.4111667 0.5888333 
## 
## 
## Response parameters 
## Resp 1 : gaussian 
##     Re1.(Intercept) Re1.dist_water Re1.sd
## St1          -0.356         -0.155  0.584
## St2           1.147         -2.304  0.318