powered by
Generates a trajectory xt given initial state z0 according to an Ornstein-Uhlenbeck process.
rTrajectoryOU(z0, t, alpha, theta, sigma, steps = 1)
Numeric value, initial state.
Numeric value or vector of size steps, denoting the time-step(s).
Numeric values, parameters of the OU process.
Integer, number of steps.
A numeric vector of length steps containing the generated values at times 0+t, 0+2t, ..., 0+steps*t.
# NOT RUN { z0 <- 0 nSteps <- 100 t <- 0.01 trajectory <- rTrajectoryOU(z0, t, 2, 2, 1, steps = nSteps) plot(trajectory, type = 'l') # }
Run the code above in your browser using DataLab