| negexp.like | R Documentation |
Computes the negative exponential distance function.
negexp.like(a, dist, covars, w.hi = NULL)
a |
A vector or matrix of covariate
and expansion term
coefficients. If matrix, dimension is
k X p, where
k = |
dist |
A numeric vector of length n or a single-column matrix (dimension nX1) containing detection distances at which to evaluate the likelihood. |
covars |
A numeric vector of length q or a
matrix of dimension nXq containing
covariate values
associated with distances in argument |
w.hi |
A numeric scalar containing maximum distance. The right-hand cutoff or upper limit. Ignored by some likelihoods (such as halfnorm, negexp, and hazrate), but is a fixed parameter in other likelihoods (such as oneStep and uniform). |
The negative exponential likelihood is
f(x|\alpha) = \exp(-\alpha x)
where \alpha is the
slope parameter.
A list containing the following two components:
L.unscaled: A matrix of size
nXk
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 of a). This matrix is
"unscaled" because the underlying likelihood does
not integrate to one. Values in L.unscaled
are always greater than or equal to zero.
params: A nXkXb array
of the
likelihood's (canonical) parameters in link space (i.e., on
log scale). 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, oneStep, Gamma, and others.
Rows correspond to distances in dist. Columns
correspond to rows from argument a.
dfuncEstim,
abundEstim,
other <likelihood>.like functions
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.