Returns effective strip width (ESW) for 
  line-transect detection functions. 
  See EDR is for point transects.
ESW(object, newdata = NULL)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.
An Rdistance model frame or fitted distance function,
normally produced by a call to dfuncEstim.
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.
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.
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)\)
dfuncEstim, EDR, 
effectiveDistance
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
Run the code above in your browser using DataLab