R/paramsPOUMM.R
rTrajectoryOU.Rd
Generates a trajectory xt given initial state z0 according to an Ornstein-Uhlenbeck process.
rTrajectoryOU(z0, t, alpha, theta, sigma, steps = 1)
z0 | Numeric value, initial state. |
---|---|
t | Numeric value or vector of size steps, denoting the time-step(s). |
alpha, theta, sigma | Numeric values, parameters of the OU process. |
steps | Integer, number of steps. |
A numeric vector of length steps containing the generated values at times 0+t, 0+2t, ..., 0+steps*t.
z0 <- 0 nSteps <- 100 t <- 0.01 trajectory <- rTrajectoryOU(z0, t, 2, 2, 1, steps = nSteps) plot(trajectory, type = 'l')