uniform.like {Rdistance} | R Documentation |
uniform.like - Uniform distance likelihood
Description
Compute uniform-like distribution for
distance functions. This function was present in Rdistance
version < 2.2.0. It has been replaced by the more appropriately named
logistic.like
.
Usage
uniform.like(
a,
dist,
covars = NULL,
w.lo = 0,
w.hi = max(dist),
series = "cosine",
expansions = 0,
scale = TRUE,
pointSurvey = FALSE
)
Arguments
a |
A vector of likelihood parameter values. Length and meaning
depend on whether covariates and
|
dist |
A numeric vector containing observed distances with measurement units. |
covars |
Data frame containing values of covariates at
each observation in |
w.lo |
Scalar value of the lowest observable distance, with measurement
units.
This is the left truncation sighting distance. Values less than
|
w.hi |
Scalar value of the largest observable distance, with measurement
units.
This is the right truncation sighting distance.
Values greater than |
series |
A string specifying the type of expansion to
use. Currently, valid values are 'simple', 'hermite', and
'cosine'; but, see |
expansions |
A scalar specifying the number of terms
in |
scale |
Logical scalar indicating whether or not to scale
the likelihood into a density function, i.e., so that it integrates
to 1. This parameter is used
to stop recursion in other functions.
If |
pointSurvey |
Boolean. TRUE if |
Value
A numeric vector the same length and order as dist
containing the likelihood contribution for corresponding distances
in dist
.
Assuming L
is the returned vector,
the log likelihood of all data is -sum(log(L), na.rm=T)
.
Note that the returned likelihood value for distances less than
w.lo
or greater than w.hi
is NA
, and thus it is
essential to use na.rm=TRUE
in the sum. If scale
= TRUE,
the integral of the likelihood from w.lo
to w.hi
is 1.0.
If scale
= FALSE, the integral of the likelihood is
arbitrary.
Expansion Terms
If expansions
= k (k > 0), the
expansion function specified by series
is called (see for example
cosine.expansion
). Assuming
h_{ij}(x)
is the j^{th}
expansion term
for the i^{th}
distance and that
c_1, c_2, \dots, c_k
are (estimated)
coefficients, the likelihood contribution
for the i^{th}
distance is,
f(x|a,b,c_1,c_2,\dots,c_k) = f(x|a,b)(1 +
\sum_{j=1}^{k} c_j h_{ij}(x)).