Gradient of the non-normalised pdf of distances or the detection function for the distances.
Source:R/distpdf.grad.R
distpdf.grad.Rd
This function has been updated to match distpdf closely, so that it has the same flexibility. Effectively, it gives the gradient of distpdf or detfct, whichever one is specified.
Usage
distpdf.grad(
distance,
par.index,
ddfobj,
standardize = FALSE,
width,
point,
left = 0,
pdf.based = TRUE
)
Arguments
- distance
vector of distances
- par.index
the index of the parameter of interest
- ddfobj
the ddf object
- standardize
whether the function should return the gradient of the standardized detection function g(x)/g(0) (TRUE), or simply of g(0) (FALSE). Currently only implemented for standardize = FALSE.
- width
the truncation width
- point
are the data from point transects (TRUE) or line transects (FALSE).
- left
the left truncation (default 0)
- pdf.based
is it the gradient of the non-normalised pdf (TRUE) or the detection function (FALSE)? Default is TRUE.
Value
the gradient of the non-normalised pdf or detection w.r.t. to
the parameter with parameter index par.index
.
Details
Various functions used to specify key and adjustment functions for gradients of detection functions.
So far, only developed for the half-normal, hazard-rate and uniform key functions in combination with cosine, simple polynomial and Hermite polynomial adjustments. It is only called by the gradient-based solver and should not be called by the general user.
distpdf.grad
will call either a half-normal, hazard-rate or uniform
function with adjustment terms to fit the data better, returning the
gradient of detection at that distance w.r.t. the parameters. The adjustments
are either cosine, Hermite or simple polynomial.