makePar: 'makePar' gets parameters for subsequent filter/smoother

Description Usage Arguments Value Examples

View source: R/makePar.r

Description

Function builds movement kernels for 2 different behavior states and calculates, if desired, switching probability using an expectation maximization routine

Usage

1
makePar(migr.spd, grid, L.arr, p.guess = c(0.7, 0.8), calcP = FALSE)

Arguments

migr.spd

is numeric input to calc.param

grid

is a grid output by resample.grid that corresponds to the extent and resolution of L.arr (below).

L.arr

is the likelihood array used for state switch probability calculation (see expmax). This is typically the L.mle array returned from make.L because it's typically more coarse (and thus faster) than the higher-resolution L array.

p.guess

is vector of length 2 indicating probability of staying in states 1 and 2, respectively

calcP

is logical indicating whether to use expmax to calculate state-switching probabilities

Value

list of parameters including movement kernels (K1, K2) and switch probability (P.final)

Examples

1
2
3
4
5
## Not run: 
par0 <- makePar(migr.spd=2, grid=g.mle, L.arr=L.mle, p.guess=c(.9,.9), calcP=T)

## End(Not run)
      

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