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., nrow(a)) is the number of coefficient vectors to evaluate (cases) and $p$ (i.e., ncol(a)) is the number of covariate and expansion coefficients in the likelihood. If a is a dimensionless vector, it is interpreted to be a single row with $k$ = 1. Covariate coefficients in a are the first $q$ values ($q$ <= $p$), and must be on a log scale.

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 d

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:

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")


[Package Rdistance version 4.0.5 Index]