Learn R Programming

smam (version 0.2-2)

fitBmme: Fit a Brownian Motion with Measurement Error

Description

Given discretely observed animal movement locations, fit a Brownian motion model with measurement errors.

Usage

fitBmme(dat, start = NULL, method = "Nelder-Mead", optim.control = list())

Arguments

dat
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 two component, one for sigma (sd of BM) and the other for delta (sd for measurement error). If unspecified (NULL), a moment estimator will be used assuming equal sigma and delta.
method
the method argument to feed optim.
optim.control
a list of control that is passed down to optim.

Value

A list of the following components:
estimate
the esimated parameter vector
var.est
variance matrix of the estimator
loglik
loglikelihood evaluated at the estimate
convergence
convergence code from optim

Details

The joint density of the increment data is multivariate normal with a sparse (tri-diagonal) covariance matrix. Sparse matrix operation from package Matrix is used for computing efficiency in handling large data.

References

Pozdnyakov V., Meyer, TH., Wang, Y., and Yan, J. (2013) On modeling animal movements using Brownian motion with measurement error. Ecology doi:doi:10.1890/13-0532.1.

See Also

fitMovRes

Examples

Run this code
set.seed(123)

tgrid <- seq(0, 500, by = 1)
dat <- rbmme(tgrid, sigma = 1, delta = 0.5)

fit <- fitBmme(dat)
fit

Run the code above in your browser using DataLab