rvBM | R Documentation |
Simulate a multivariate Brownian motion
rvBM(times, n = 1, sigma = rep(1, n), B0 = rep(0, n), u = rep(0, n))
times |
numeric vector of time points where the Brownian motion should be simulated |
n |
numeric scalar, dimension of Brownian motion |
sigma |
noise level in the Brownian motion. A vector of length n, one for each dimension, or a scalar, in which case the same level is applied to all dimensions. |
B0 |
initial condition, applicable at time t=0. A vector of length n, one for each dimension, or a scalar, in which case the same initial condition is applied to all dimensions. |
u |
Drift. An optional numeric n-vector which defaults to a vector of zeros. When supplied, a linear drift (bias) is added to each component. |
a numeric array, n*length(times), each column containing a sample path
times <- 0:10
VB <- rvBM(times,3)
matplot(times,VB,type="b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.