dshm_prep: Prepares data for Hurdle model fitting

Description Usage Arguments Value Author(s)

View source: R/helpers.R

Description

Prepares data for Hurdle model fitting

Usage

1
dshm_prep(det.fn, obsdata, segdata, group = FALSE, strip.width = NULL)

Arguments

det.fn

Detection function fitted by ds.

obsdata

Dataframe object containing 4 columns: (1) 'Sample.Label' (i.e. label for segments), (2) 'size' for cluster size, (3) 'distance' (in km) for perpendicular distance of sighting from the transect line, and (4) 'Effort' for segment length (in km).

segdata

Dataframe object with at least 3 columns: (1) 'Transect.Label' (i.e. label for transects), (2) 'Sample.Label' (i.e. label for segments), and (3) 'Effort' for segment length (in km). It may also contain additional columns with relevant habitat covariates specific to each segment that will be fed into the spatial model.

group

If TRUE group abundance is estimated (i.e. 'size' = 1).

strip.width

Transect strip width to calculate segment area if area is not provided.

Value

Input dataframe 'segdata' with an additional column for animal abundance ('abund') corrected by the detection probability estimated by ds. If they are not included, a column for presence-absence ('pa') is added together with one for segment area (Effort*w, i.e. the strip width estimated by ds).

Author(s)

Filippo Franchini filippo.franchini@outlook.com


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