Learn R Programming

crawl (version 1.0-1)

crwN2ll: -2 * log-likelihood for CTCRW models

Description

This function is designed for primary use within the crwMLE model fitting function. But, it can be accessed for advanced R and crawl users. Uses the state-space parameterization and Kalman filter method presented in Johnson et al. (2008).

Usage

crwN2ll(theta, fixPar, y, x, loctype, delta, a1.y, a1.x, P1.x, P1.y,
        lonAdj, mov.mf, err.mfX, err.mfY, stop.mf, n.errX, n.errY,
        n.mov, stopMod, driftMod)

Arguments

theta
parameter values.
fixPar
values of parameters held fixed (contains NA for theta values).
y
latitude locations.
x
longitude loations.
loctype
vector with 1 or observed location, else 0.
delta
time difference to next location.
a1.y
initial state value for latitude.
a1.x
initial state value for longitude.
P1.x
intial state covariance matrix for latitude.
P1.y
inital state covariance matrix for longitude.
lonAdj
= 1/cos(y*pi/180) as described in Johnson et al. (2008) for polar coords. = 1 for non-polar coords.
mov.mf
Movement covariate data.
err.mfX
longitude error covariate data.
err.mfY
latitude error covariate data.
stop.mf
stopping covariate.
n.errX
number or longitude error parameters.
n.errY
number of latitude error parameters.
n.mov
number or movement parameters.
stopMod
Logical. indicates wheteher a stop model is specified.
driftMod
Logical. inicates whether a drift model is specified.

Value

  • -2 * log-likelihood value for specified CTCRW model.

Details

This function calls compiled Fortran code which can be viewed in the src directory of the crawl library.

References

Johnson, D., J. London, M. -A. Lea, and J. Durban. 2008. Continuous-time model for animal telemetry data. Ecology 89:1208-1215.

See Also

crwMLE