The Ornstein-Uhlenbeck Process: Parametrization
The Ornstein-Uhlenbeck Process: Parametrization
Parametrization
The Ornstein-Uhlenbeck process is defined with (mean zero), as the SDE
where φ > 0 and Wt is the Wiener process. This is the continuous time analogue to the discrete time
AR(1) model.
The process has a Markov property. Let x = (x1 , x2 , . . . , xn ) be value of the process at increasing
time-points t = (t1 , t2 , . . . , tn ), then the conditional distribution
xi | x1 , . . . , xi−1 , i = 2, . . . , n,
Hyperparameters
The precision parameter τ is represented as
θ1 = log(τ )
where τ is the marginal precision for the Ornstein-Uhlenbeck process given above.
The parameter φ is represented as
θ2 = log(φ)
and the prior is defined on θ = (θ1 , θ2 ).
Specification
The Ornstein-Uhlenbeck model is specified inside the f() function as
The optional argument values gives the time-points where the process is defined/observed on
(default is unique(sort(<whatever>))).
1
Hyperparameter specification and default values
doc The Ornstein-Uhlenbeck process
hyper
theta1
hyperid 16001
name log precision
short.name prec
prior loggamma
param 1 5e-05
initial 4
fixed FALSE
to.theta function(x) log(x)
from.theta function(x) exp(x)
theta2
hyperid 16002
name log phi
short.name phi
prior normal
param 0 0.2
initial -1
fixed FALSE
to.theta function(x) log(x)
from.theta function(x) exp(x)
constr FALSE
nrow.ncol FALSE
augmented FALSE
aug.factor 1
aug.constr
n.div.by
n.required FALSE
set.default.values FALSE
pdf ou
Example
## simulate an OU-process and estimate its parameters back.
phi = -log(0.95)
sigma = 1
marg.prec = 2*phi/sigma^2
n = 1000
locations = cumsum(sample(c(1, 2, 5, 20),n, replace=TRUE))
2
## do it sequentially and slow (for clarity)
x = numeric(n)
x[1] = rnorm(1, mean=0, sd = sqrt(1/marg.prec))
for(i in 2:n) {
delta = locations[i] - locations[i-1]
x[i] = x[i-1] * exp(-phi * delta) +
rnorm(1, mean=0, sd = sqrt(1/marg.prec * (1-exp(-2*phi*delta))))
}
Notes
The Ornstein-Uhlenbeck process is the continuous-time analogue to the discrete AR(1) model (for
positive lag-one correlation only), but they are parameterised slightly different.