hmmpars.paramtetric.boot: Parameteric bootstrap availability HMM.

View source: R/bootstrap.R

hmmpars.paramtetric.bootR Documentation

Parameteric bootstrap availability HMM.

Description

Bootstraps hidden Markov model (HMM) data from estimated parameters and their variance-covariance matrix (one of each for each animal).

Usage

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

Arguments

availhmm

list with availability HMM parameters, as for the hmm.pars parameter of est.hmltm. The list must contain these elements:

  • Pi: a 3D matrix of Markov chain transition probability matrices, with element [,,i] containing the 2D matrix (Pi) for animal i (state 1=unavailable, state 2=available).

  • pm: a matrix with element [,i] containing the state-dependent Bernoulli “success” parameters (p) for each state (first state=unavailable, 2nd=available) for animal i.

  • delta: a matrix with element [,i] containing the stationary disribution of the Markov chain (first state=unavailable, 2nd=available).

  • vcv: a 3D array with element [,,i] containing the estimated variance- covariance matrix of the following (in this order): logit(Pi[1,1]), logit(Pi[2,1]),logit(p[1]),logit(p[2]).

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

Resamples HMM paramters assuming asymptotic normality of parameters. 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.


david-borchers/hmltm documentation built on Oct. 29, 2023, 9:07 p.m.