Learn R Programming

smam (version 0.2-2)

fitMovRes: Fit a Moving-Resting Model with Embedded Brownian Motion

Description

Fit a Moving-Resting Model with Embedded Brownian Motion with animal movement data at discretely observation times by maximizing a composite likelihood constructed from the marginal density of increment.

Usage

fitMovRes(data, start, method = "Nelder-Mead", optim.control = list()) cllk.m1(theta, data)

Arguments

data
a data.frame whose first column is the observation time, and other columns are location coordinates.
start
starting value of the model, a vector of three component, which represents two rate parameters of moving and resting duration, and one volatility parameter for the Brownian motion.
method
the method argument to feed optim.
optim.control
a list of control that if passed down to optim.
theta
a parameter vector of three components (similar to start)

Value

fitMovRes returns a list of the following components:
estimate
the esimated parameter vector
cloglik
composite loglikelihood evaluated at the estimate
convergence
convergence code from optim
cllk.m1 returns the composite loglikelihood constructed from the marginal distribution of each increment.

References

Yan, J., Chen, Y., Lawrence-Apfel, K., Ortega, I. M., Pozdnyakoc, V., Williams, S., and Meyer, T. (2013+) A moving-resting process with an embedded Brownian motion for animal movements. Population Ecology. Forthcoming.

Examples

Run this code
tgrid <- seq(0, 10, length=2001)
## make it irregularly spaced
tgrid <- sort(sample(tgrid, 1000))
set.seed(123)
dat <- rMovRes(tgrid, 1, 1, 1, "m")
## Not run: 
# fit <- fitMovRes(dat, start=c(2, 2, 2))
# fit
# ## End(Not run)

Run the code above in your browser using DataLab