Description Usage Arguments Details Value Author(s) See Also Examples

This function computes likelihood contributions for sighting distances, scaled appropriately, for use as a distance likelihood.

1 2 3 |

`a` |
A vector of likelihood parameter values. Length and meaning
depend on |

`dist` |
A numeric vector containing the observed distances. |

`covars` |
Data frame containing values of covariates at
each observation in |

`w.lo` |
Scalar value of the lowest observable distance.
This is the |

`w.hi` |
Scalar value of the largest observable distance.
This is the |

`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 so it integrates to 1. This parameter is used
to stop recursion in other functions.
If |

`pointSurvey` |
Boolean. TRUE if |

The uniform likelihood is not technically uniform. This function is continuous at its upper limit (a true uniform is discontinuous at its upper limit) which allows better estimation of the upper limit. The function has two parameters (the upper limit or 'threshold' and the 'knee') and can look similar to a uniform or a negative exponential.

The uniform likelihood used here is actually the
*heavy side* or *logistic* function of the form,

*
f(x|a,b) = 1 - 1 / (1 + exp(-b*(x-a))) = exp(-b*(x-a)) / (1 + exp(-b*(x-a))),*

where *a* and *b* are the parameters to be estimated.

Parameter *a*, the "threshold", is the location of the
approximate upper limit of a uniform distribution's
support. The inverse likelihood of 0.5
is `a`

before scaling
(i.e., `uniform.like(c(a,b),a,scale=FALSE)`

equals
`0.5`

).

Parameter `b`

, the "knee", is the sharpness
of the bend at `a`

and estimates the degree to which
observations decline at the outer limit of sightability.
Note that, prior to scaling for `g.x.scl`

,
the slope of the likelihood at *a* is *-b/4*.
After scaling for `g.x.scl`

, the inverse of
`g.x.scl/2`

is close to `a/f(0)`

. If *b*
is large, the "knee" is sharp and the likelihood looks
uniform with support from
`w.lo`

to *a/f(0)*. If *b* is small, the
"knee" is shallow and the density of observations declines
in an elongated "S" shape pivoting at `a/f(0)`

.
As `b`

grows large and assuming f(0) = 1, the effective
strip width approaches `a`

from above.

See Examples for plots using large and small values of *b*.

**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), ..., c(k)* are (estimated)
coefficients for the expansion terms, the likelihood contribution
for the *i-th* distance is,

*
f(x|a,b,c_1,c_2,...,c_k) = f(x|a,b)(1 + c(1) h_i1(x) +
c(2) h_i2(x) + ... + c(k) h_ik(x)). *

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 from one of these functions,
the full log likelihood of all the 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
prudent 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.

Trent McDonald, WEST, Inc. tmcdonald@west-inc.com

Aidan McDonald, WEST, Inc. aidan@mcdcentral.org

`dfuncEstim`

,
`halfnorm.like`

,
`hazrate.like`

,
`negexp.like`

,
`Gamma.like`

1 2 3 4 5 6 7 8 9 10 11 | ```
x <- seq(0, 100, length=100)
# Plots showing effects of changes in Threshold
plot(x, uniform.like(c(20, 20), x), type="l", col="red")
plot(x, uniform.like(c(40, 20), x), type="l", col="blue")
# Plots showing effects of changes in Knee
plot(x, uniform.like(c(50, 100), x), type="l", col="red")
plot(x, uniform.like(c(50, 1), x), type="l", col="blue")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.