Learn R Programming

smam (version 0.7.2)

rBMME: Sampling from Brown Motion with Measurement Error

Description

Given the volatility parameters of a Brownian motion and normally distributed measurement errors, generate the process at discretely observed time points of a given dimension.

Usage

rBMME(time, dim = 2, sigma = 1, delta = 1)

rBmme(time, dim = 2, sigma = 1, delta = 1)

Value

A data.frame whose first column is the time points and whose other columns are coordinates of the locations.

Arguments

time

vector of time points at which observations are to be sampled

dim

(integer) dimension of the Brownian motion

sigma

volatility parameter (sd) of the Brownian motion

delta

sd parameter of measurement error

References

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

Examples

Run this code
tgrid <- seq(0, 10, length = 1001)
## make it irregularly spaced
tgrid <- sort(sample(tgrid, 800))
dat <- rBMME(tgrid, 1, 1)
plot(dat[,1], dat[,2], xlab="t", ylab="X(t)", type="l")

Run the code above in your browser using DataLab