data.gen.bm: Generate a time series of Brownian motion.

View source: R/data_gen_BM.R

data.gen.bmR Documentation

Generate a time series of Brownian motion.

Description

This function generates a time series of one dimension Brownian motion.

Usage

data.gen.bm(
  x0 = 0,
  w0 = 0,
  time = seq(0, by = 0.01, length.out = 101),
  do.plot = TRUE
)

Arguments

x0

the start value of x, with the default value 0

w0

the start value of w, with the default value 0

time

the temporal interval at which the system will be generated. Default seq(0,by=0.01,len=101).

do.plot

a logical value. If TRUE (default value), a plot of the generated system is shown.

References

Yanping Chen, http://cos.name/wp-content/uploads/2008/12/stochastic-differential-equation-with-r.pdf

Examples

set.seed(123)
x <- data.gen.bm()

synthesis documentation built on Nov. 2, 2023, 5:51 p.m.