Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

r.ou

Ornstein-Uhlenbeck process


Description

Sampling of paths of the Ornstein-Uhlenbeck process.

Usage

r.ou(
  n,
  t = seq(0, 1, len = 201),
  mu = 0,
  alpha = 1,
  sigma = 1,
  x0 = rnorm(n, mean = mu, sd = sigma/sqrt(2 * alpha))
)

Arguments

n

number of curves.

t

discretization points.

mu

mean of the process.

alpha

strength of the drift.

sigma

diffusion coefficient.

x0

a number or a vector of length n giving the initial value(s) of the Ornstein-Uhlenbeck process. By default, n points are sampled from the stationary distribution.

Value

Functional sample, an fdata object of length n.

Author(s)

Eduardo Garcia-Portugues (edgarcia@est-econ.uc3m.es).

Examples

plot(r.ou(n = 100))
plot(r.ou(n = 100, alpha = 2, sigma = 4, x0 = 1:100))

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.