3
$\begingroup$

How can I rewrite an AR(p) model in state-space form? Max(p)=5 and I want to use Kalman Predictor.

$\endgroup$
  • $\begingroup$ May I ask what kind of data do you want to model and for what usage you want to do it? $\endgroup$ – RockScience Nov 24 '10 at 6:35
  • $\begingroup$ Turbulent velocity components (3D) collected by an HR Acoustic Doppler Current Profiler (HRCP) in an estuary. $\endgroup$ – K-1 Nov 26 '10 at 0:41
4
$\begingroup$

I suggest you buy the excellent book by G. Petris, S. Petrone and P. Campagnoli Dynamic Linear Models with R.

You will learn that any ARMA model

$Y_t = \sum_{j=1}^{r}\phi_jY_{t-j} + \sum_{j=1}^{r-1}\psi_{j}\epsilon_t$

can be expressed in the following form:

$ \begin{matrix} Y_t & = & F\theta_t\\ \theta_{t+1} & = & G\theta_{t}+R\epsilon_t \end{matrix} $

with $ F=\begin{bmatrix} 1 & 0 & ... & 0 \end{bmatrix} $

$ G=\begin{bmatrix} \phi_1 & 1 & 0 & ... & 0\\ \phi_2 & 0 & 1 & ... & 0\\ ... & ... & ... & ... & ...\\ \phi_{r-1} & 0 & ... & 0 & 1\\ \phi_r & 0 & ... & 0 & 0 \end{bmatrix} $

$ R={\begin{bmatrix} 1 & \psi_1 & ... & \psi_{r-2} & \psi_{r-1} \end{bmatrix}}' $

In your specific case, just set $r=5$ and $\psi_{j=1..5}=0$.
You can use the package dlm to use the Kalman filter on this model.
fRed

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Where can I find help to display the latex formulae! $\endgroup$ – RockScience Nov 24 '10 at 2:12
  • $\begingroup$ Surround latex with $ .. $ $\endgroup$ – user28 Nov 24 '10 at 2:16
  • $\begingroup$ Thanks fRed, first part is quite useful, but as this calculation is a part of much larger code, I cannot use dlm unless it can be linked with Mathematica Kernel. $\endgroup$ – K-1 Nov 26 '10 at 0:43
  • $\begingroup$ You can use scienceops.com/Rlink2.asp But too bad you have to pay to use R! $\endgroup$ – RockScience Nov 26 '10 at 2:21
4
$\begingroup$

Another good book that covers this is Time Series Analysis by State Space Methods by Durbin and Koopman (pp 46-49.)

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.