Compute exact integral of the one-step distance function for line transects.
integrateOneStepLines(object, newdata = NULL, Units = NULL)A vector of areas under the distance functions represented in
object.
If object is a distance function and
newdata is specified, the returned vector's length is
nrow(newdata). If object is a distance function and
newdata is NULL,
returned vector's length is length(distances(object)). If
object is a matrix, return's length is
nrow(object).
Either an Rdistance fitted distance function
(an object that inherits from class "dfunc"; usually produced
by a call to dfuncEstim), or a matrix of canonical
distance function parameters (e.g., matrix(exp(fit$par),1)).
If a matrix, each row corresponds to a
distance function and each column is a parameter. The first column is
the parameter related to sighting covariates and must be transformed
to the "real" space (i.e., inverse link, which is \(exp()\), must
be applied outside this routine). If object is a matrix,
it should not have measurement units because
only derived quantities (e.g., ESW) have units; Rdistance function
parameters themselves never have units.
A data frame containing new values for
the distance function covariates. If NULL and
object is a fitted distance function, the
observed covariates stored in
object are used (behavior similar to predict.lm).
Argument newdata is ignored if object is a matrix.
Physical units of sighting distances if
object is a matrix. Sighting distance units can differ from units
of w.lo or w.hi. Ignored if object
is a fitted distance function.
Returned integrals are $$\int_0^{w} (\frac{p}{\theta_i}I(0\leq x \leq \theta_i) + \frac{1-p}{w - \theta_i}I(\theta_i < x \leq w)) dx = \frac{\theta_i}{p},$$ where \(w = w.hi - w.lo\), \(\theta_i\) is the estimated one-step distance function threshold for the i-th observed distance, and \(p\) is the estimated one-step proportion.
integrateNumeric; integrateNegexpLines;
integrateHalfnormLines
# A oneStep distance function on simulated data
whi <- 250
T <- 100 # true threshold
p <- 0.85 # true proportion Run the code above in your browser using DataLab