hmm.filter: HMM filter functions

Description Usage Arguments Value References Examples

View source: R/hmm.filter.R

Description

HMM filter functions

Usage

1
hmm.filter(g, L, K1, K2, P, maskL = T, bound.thr = 0.1, minBounds = 10)

Arguments

g

grid from setup.grid

L

is likelihood array output from make.L

K1

first movement (diffusion) kernel see gausskern

K2

second movement (diffusion) kernel see gausskern

P

2x2 probability matrix for transitions between states (K1 and K2)

maskL

is logical indicating whether to mask the input L layer. See mask.L for details.

bound.thr

is numeric indicating the percent threshold that is added and subtracted from the bounding box of the filter output from the previous day before masking. Default is .05 (5 percent).

minBounds

is size (in degrees) of the minimum bounding box around the previous days filter prediction that L data within that box will be included. Outside this box (centered on t-1 filter prediction), L will be masked out.

Value

a list: list(phi = phi, pred = pred, psi = psi) where

References

Pedersen MW, Patterson TA, Thygesen UH, Madsen H (2011) Estimating animal behavior and residency from movement data. Oikos 120:1281-1290. doi: 10.1111/j.1600-0706.2011.19044.x

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Not run as function relies on large arrays of likelihoods
# RUN THE FILTER STEP
f <- hmm.filter(g, L, K1, K2, maskL=T, P.final, minBounds = bnd)
nllf <- -sum(log(f$psi[f$psi>0])) # negative log-likelihood


## End(Not run)

HMMoce documentation built on Nov. 17, 2017, 5:57 a.m.