dshm_fit: Fitting spatial Hurdle models

Description Usage Arguments Details Value Author(s)

View source: R/dshm_fit.R

Description

dshm_fit fits Hurdle models, performs model averaging, calculates Hurdle model predictions on a user-defined grid.

Usage

1
2
3
4
dshm_fit(det.fn, effects.pa = NULL, effects.ab = NULL,
  knots.pa = NULL, knots.ab = NULL, method = "GCV.Cp", lim = 0.1,
  obsdata, segdata, grid, SelectionTable = TRUE,
  showSelectedModels = FALSE, group = FALSE, strip.width = NULL)

Arguments

det.fn

Detection function fitted by 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.

knots.pa

List of knot gam knot positions for each smooth term of the fitted binomial models.

knots.ab

List of knot gam knot positions for each smooth term of the fitted zero-truncated Poisson models.

method

GAM fitting method. Note that "REML" is not available since it is not campatible with ztpoisson. Default is "GCV.Cp".

lim

AIC weight (AICw) threshold for model averaging. Models with AICw < lim are not averaged. Default is 0.1.

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.

grid

Grid used for model prediction. Column names for habitat covriates should correspond to those in 'segdata'. You can create a grid using the function dshm_make_grid. For more information about creating and preparing a grid for spatial analysis you can download the build_grid.pdf tutorial.

SelectionTable

If TRUE model selection table is reported for each submodel. Default is TRUE.

showSelectedModels

If TRUE best fitted submodel variants are reported. Default is FALSE.

group

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

strip.width

Strip width to calculate segment area if there is no "area" column in segdata.

Details

Hurdle models are two stage models. They consist in a presence-absence (pa) submodel and an abundance-given-presence (ab) submodel. Each submodel can be specified in many ways that we call submodel variants. Final Hurdle model predictions are obtained by multiplying pa with ab predictions. For more information about fitting Hurdle models you can download the fitting_Hurldle.pdf tutorial.

Value

A list of 6 objects:

Author(s)

Filippo Franchini filippo.franchini@outlook.com


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