Description Usage Arguments Value References Examples
HMM filter functions
1 | hmm.filter(g, L, K1, K2, P, maskL = T, bound.thr = 0.1, minBounds = 10)
|
g |
grid from |
L |
is likelihood array output from |
K1 |
first movement (diffusion) kernel see |
K2 |
second movement (diffusion) kernel see |
P |
2x2 probability matrix for transitions between states (K1 and K2) |
maskL |
is logical indicating whether to mask the input L layer. See
|
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. |
a list: list(phi = phi, pred = pred, psi = psi) where
phi. is the probability for each state at each time step
pred. is ....
psi. is....
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.