negexp.like {Rdistance} | R Documentation |
negexp.like - Negative exponential likelihood
Description
Computes the negative exponential distance function.
Usage
negexp.like(a, dist, covars)
Arguments
a |
A vector or matrix of covariate
and expansion term
coefficients. Dimension is $k$ X $p$, where
$k$ (i.e., |
dist |
A numeric vector of length $n$ or a single-column matrix (dimension $n$X1) containing detection distances at which to evaluate the likelihood. |
covars |
A numeric vector of length $q$ or
matrix of dimension $n$X$q$ containing covariate values
associated with distances in argument |
Details
The negative exponential likelihood is
f(x|a) = \exp(-ax)
where a
is the
slope parameter.
Value
A list containing the following two components:
-
L.unscaled: A matrix of size $n$X$k$X$b$ containing likelihood values evaluated at distances in
dist
. Each row is associated with a single distance, and each column is associated with a single case (row ofa
). This matrix is "unscaled" because the underlying likelihood does not integrate to one. Values inL.unscaled
are always greater than or equal to zero. -
params: A $n$X$k$X$b$ array of the likelihood's (canonical) parameters, First page contains parameter values related to covariates (i.e., $s = exp(x'a)$), while subsequent pages contain other parameters. $b$ = 1 for halfnorm, negexp; $b$ = 2 for hazrate and others. Rows correspond to distances in
dist
. Columns correspond to rows from argumenta
.
See Also
dfuncEstim
,
hazrate.like
,
negexp.like
Examples
d <- seq(0, 100, length=100)
covs <- matrix(1,length(d),1)
negexp.like(log(0.01), d, covs)
# Changing slope parameter
plot(d, negexp.like(log(0.1), d, covs)$L.unscaled, type="l", col="red")
lines(d, negexp.like(log(0.05), d, covs)$L.unscaled, col="blue")