dshm_boot: Non-parametric bootstrap for Hurdle model uncertainty

Description Usage Arguments Value Author(s)

View source: R/dshm_boot.R

Description

dshm_boot performs a non-parametric bootstrap to generate Hurdle model predictions on a spatial grid. Prediction grids can then be used to calculate confidence intervals. The function bases on a (stratified) sampling process with replacement at the segment level.

Usage

1
2
3
4
dshm_boot(det.fn.par, effects.pa = NULL, effects.ab = NULL, distdata,
  obsdata, segdata, model_fit, grid, group = FALSE, nsim,
  parallel = FALSE, ncores = NULL, mute = TRUE,
  stratification = "none")

Arguments

det.fn.par

List of detection function parameters. For strucuture see the documentation for ds.

effects.pa

List of characters defining the binomial gam models to be fitted. For model structure see gam.

effects.ab

List of characters defining the zero-truncated Poisson gam models to be fitted. For model structure see gam.

distdata

Dataframe for distance sampling observations. For strucuture see the documentation for ds.

obsdata

Dataframe object with the following structure:

  • Region.Label: ID for stratum where the animal was observed.

  • Transect.Label: ID for transect where the animal was observed.

  • Sample.Label: ID for segment where the animal was observed.

  • distance: sighting perpendicular distance from the transect line.

  • size: sighting size, i.e. number of animals.

  • object: sighting ID.

segdata

Dataframe object with the following strucuture:

  • Region.Label: ID for stratum where the transects and segments are located.

  • Transect.Label: ID for split transect.

  • Sample.Label: ID for segment.

  • length: segment length.

  • area: segment area.

  • XYZ covariates: different habitat covariates such as depth, distance to coast, etc. specific to each segment.

You do not have to create segdata manually. You can use the functions in dshm to automatically split transects into segments. For more information you can download the split_transects.pdf tutorial.

model_fit

Model fitted with the function dshm_fit.

grid

Grid used for model prediction. Column names for habitat covriates should correspond to those in 'segdata'.

group

If TRUE group abundance is estimated (i.e. sighting size = 1). Default is FALSE.

nsim

Number of simulations.

parallel

If TRUE the simulations are performed on multiple cores. Default is FALSE.

ncores

Number of cores for parallel execution.

mute

If TRUE all unrelevant messages are suppressed. Default is TRUE.

stratification

Bootstrap can be executed at the level of the "transect" or "stratum". Default is stratification = "none".

Value

A list of two arrays:

Author(s)

Filippo Franchini filippo.franchini@outlook.com


FilippoFranchini/dshm documentation built on April 25, 2020, 9:40 p.m.