bs.hmltm: Bootstrap for hmltm model.

View source: R/bootstrap.R

bs.hmltmR Documentation

Bootstrap for hmltm model.

Description

Stratified nonparameteric bootstrap of hidden Markov line transect model (hmltm) with transects as the sampling units.

Usage

bs.hmltm(
  hmltm.est,
  B,
  hmm.pars.bs = NULL,
  bs.trace = 0,
  report.by = 10,
  fixed.avail = FALSE,
  bsfile = NULL
)

Arguments

hmltm.est

output from est.hmltm.

B

number of bootstrap replicates to do.

hmm.pars.bs

output hmmpars.boot, containing sets of refitted HMM parameter values.

bs.trace

amount of reporting that optim should do while fitting models to bootstrapped datasets. (bs.trace=0 is no reporting, which is fasters. See component trace of parameter control.opt of function optim for more details.)

report.by

frequency with which to report count of number of bootstraps completed.

fixed.avail

whether to treat the hidden Markov availability model as fixed (fixed.avail=TRUE) or random (fixed.avail=FALSE). If fixed.avail=FALSE, the availability model is also bootstrapped (see Details below).

bsfile

Name of file to which bootstrap estimates should be written at each iteration (e.g., in case of crash).

Details

If fixed.avail=FALSE, then: (1) IF hmltm.est$hmltm.fit$fitpars$hmm.pars$Et is not NULL, the availability process is bootstrapped by drawing pairs of mean times available (Ea) and unavailable (Eu) from a bivariate lognormal distribution with mean hmltm.est$hmltm.fit$fitpars$hmm.pars$Et and standard deviation hmltm.est$hmltm.fit$fitpars$hmm.pars$Sigma.Et and converting this to Markov Model transition probability matrix parameters using makePi, ELSE IF hmm.pars.bs is not NULL, random samples with replacement, of HMM parameter sets are taken from hmm.pars.bs.

See Also

bootsum summarises output from this function.

hmmpars.boot, which is is used to generate hmm.pars.bs.


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