ESW: ESW - Effective Strip Width (ESW) for line transects

View source: R/ESW.r

ESWR Documentation

ESW - Effective Strip Width (ESW) for line transects

Description

Returns effective strip width (ESW) for line-transect detection functions. See EDR is for point transects.

Usage

ESW(object, newdata = NULL)

Arguments

object

An Rdistance model frame or fitted distance function, normally produced by a call to dfuncEstim.

newdata

A data frame containing new values for covariates at which either ESW's or EDR's will be computed. If NULL and object contains covariates, the covariates stored in object are used (like predict.lm). If not NULL, covariate values in newdata are used. See Value section for more information.

Details

ESW is the area under the scaled distance function between its left-truncation limit (obj$w.lo) and its right-truncation limit (obj$w.hi).

If detection does not decline with distance, the detection function is flat (horizontal), and area under the detection function is g(0)(w.hi - w.lo). If, in this case, g(0) = 1, effective sampling distance is the half-width of the surveys, (w.hi - w.lo)

Value

If newdata is present, the returned value is a vector of effective sampling distances for values of the covariates in newdata with length equal to the number of rows in newdata. If newdata is NULL, the returned value is a vector of effective sampling distances associated with covariate values in object and has the same number of detected groups. The returned vector has measurement units, i.e., object$outputUnits.

Numeric Integration

Rdistance uses Simpson's composite 1/3 rule to numerically integrate under distance functions. The number of points evaluated during numerical integration is controlled by options(Rdistance_intEvalPts) (default 101). Option 'Rdistance_intEvalPts' must be odd because Simpson's rule requires an even number of intervals (hence, odd number of points). Lower values of 'Rdistance_intEvalPts' increase calculation speeds; but, decrease accuracy. 'Rdistance_intEvalPts' must be >= 5. A warning is thrown if 'Rdistance_intEvalPts' < 29. Empirical tests by the author suggest 'Rdistance_intEvalPts' values >= 30 are accurate to several decimal points and that all 'Rdistance_intEvalPts' >= 101 produce identical results in all but pathological cases.

See Also

dfuncEstim, EDR, effectiveDistance

Examples

data(sparrowDf)
dfunc <- sparrowDf |> dfuncEstim(formula=dist~bare)

ESW(dfunc) # vector length 356 = number of groups
ESW(dfunc, newdata = data.frame(bare = c(30,40))) # vector length 2


tmcd82070/Rdistance documentation built on April 13, 2025, 1:38 p.m.