crwN2ll: -2 * log-likelihood for CTCRW models

View source: R/crwN2ll.R

crwN2llR Documentation

-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,
  noObs,
  delta,
  mov.mf,
  err.mfX,
  err.mfY,
  rho = NULL,
  activity = NULL,
  n.errX,
  n.errY,
  n.mov,
  driftMod,
  prior,
  need.hess,
  constr = list(lower = -Inf, upper = Inf)
)

Arguments

theta

parameter values.

fixPar

values of parameters held fixed (contains NA for theta values).

y

N by 2 matrix of coordinates with the longitude coordinate in the first column.

noObs

vector with 1 for unobserved locations, and 0 for observed locations.

delta

time difference to next location.

mov.mf

Movement covariate data.

err.mfX

longitude error covariate data.

err.mfY

latitude error covariate data.

rho

A vector of known correlation coefficients for the error model, typically used for modern ARGOS data.

activity

Stopping covariate (= 0 if animal is not moving).

n.errX

number or longitude error parameters.

n.errY

number of latitude error parameters.

n.mov

number or movement parameters.

driftMod

Logical. indicates whether a drift model is specified.

prior

Function of theta that returns the log-density of the prior

need.hess

Whether or not the Hessian will need to be calculated from this call

constr

Named list giving the parameter constraints

Details

This function calls compiled C++ code which can be viewed in the src directory of the crawl source package.

Value

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

Author(s)

Devin S. Johnson

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


crawl documentation built on Oct. 10, 2022, 1:07 a.m.