Learn R Programming

smam (version 0.2-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)

Arguments

time
vector of time points at which observations are to be sampled
dim
dimension of the Brownian motion
sigma
volatility parameter (sd) of the Brownian motion
delta
sd parameter of measurement error

Value

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

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.

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