r.ou: Ornstein-Uhlenbeck process

Description Usage Arguments Value Author(s) Examples

View source: R/models.R

Description

Sampling of paths of the Ornstein-Uhlenbeck process.

Usage

1
2
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 functions to sample.

t

time locations for the functional data.

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 García-Portugués (edgarcia@est-econ.uc3m.es).

Examples

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

egarpor/rp.flm.test documentation built on Oct. 20, 2021, 12:31 a.m.