hmmpars.boot: Bootstrap availability HMM.

Description Usage Arguments Details Value Examples

Description

Bootstraps hidden Markov model (HMM) data from multiple observed availability time series (one per animal).

Usage

1
hmmpars.boot(availhmm, adat, animals, seed = NULL, B, printprog = TRUE)

Arguments

availhmm

list with availability HMM paramters, as for the hmm.pars parameter of est.hmltm.

adat

list of availability data time series. The ith element of the list must be named $ai and must be a vector of 0s and 1s, with 0 corresponding to being unavailable and 1 to being available.

animals

a vector of integers indicating which of the elements of adat are to be resampled.

seed

random number seed (integer).

B

number of bootstraps to perform (integer).

printprog

if TRUE prints progress through animals as it resamples.

Details

Simulates a new series of availability observations (0s and 1s) using functions dthmm and simulate from library HiddenMarkov, then fits a HMM to these data using function BaumWelch from library HiddenMarkov. Constructs a new hmm.pars object from the fitted HMM parameters.

Does the above B times, each time reformtting the hmm.pars object as a vector using vectorize.hmmpars and then entering this as the next row in a matrix of dimension BxT, where T=3+length(animals)*(nstate^2+nstate*2) and nstate is the number of states in the HMM.

Value

A matrix of dimension BxT, where T is as described above.

Examples

1
2
3
4

DistanceDevelopment/hsltm documentation built on June 21, 2019, 2:22 p.m.