BookmarkSubscribeRSS Feed
xoxo
Calcite | Level 5

Hi everyone,
I am running a Vector ARMA model using PROC VARMAX and the Maximum Likelihood method. My goal is to identify the Initial State Vector and the Initial State Covariance Matrix used by the Kalman Filter during the estimation process.
Currently, my output displays the "Initial Value of Parameters" (the starting values for the optimization), but I cannot find the specific initial values for the state-space components.
Here is a snippet of my code:
proc varmax data=work.cabai1scaled;
model rawit keriting besar / p=4 q=1 method=ml lagmax=12 printall;
nloptions pall maxit=50000 tech=quanew;
output out=out_forecast lead=24;
run;
My question is which specific option or PRINT statement should I use to see the initial state ($z_{0|0}$) and the initial covariance ($P_{0|0}$)?

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Indeed, when using the Maximum Likelihood method for your VARMA model, ... the VARMA model is transformed into the equivalent state space form and then the Kalman filtering method is applied.

 

Your question is actually twofold:
- How are the Initial State and Covariance values determined, and
- Where can I find those initial values?

 

I think @SASCom1 and/or @rselukar can answer those questions.

 

Note you can also fit these VARMA models with PROC IML and PROC SSM. Maybe over there it's easier to find these Initial State and Covariance values?

 

BR,
Koen

SASCom1
SAS Employee

Sorry for my late reply.  I needed to ask some folks about this and here is what I learned about this issue:

 

PROC VARMAX uses exact diffuse Kalman filter initialization for METHOD=ML. The initial state vector z(0|0) is set to zero (or to E(alpha_0) if the model has deterministic terms like a constant or trend), and the initial covariance P(0|0) is treated as fully diffuse (infinite variance), implemented via an augmented state matrix equal to the identity. This follows the approach in Durbin & Koopman (2001), Section 5.7. 

 

For the stationary case, the unconditional state covariance is also computed internally by solving the discrete Lyapunov equation P = TPT' + Q (where T is the companion matrix and Q is the state noise covariance). This is used in the gradient calculations during ML optimization, but the filter itself is always started diffusely rather than from this steady-state value.

 

As for printing the initialization: there is no option in PROC VARMAX to output z(0|0), P(0|0), or the augmented state matrix.

 

I hope this helps.

xoxo
Calcite | Level 5

Thankyou for your help.

I have attempted to review Section 5.7 of Durbin & Koopman (2012) as suggested, but I am still struggling to grasp the practical implementation of the initial covariance.

 

Specifically, I am confused by the statement that the initial covariance is treated as fully diffuse but implemented via an augmented state matrix equal to the identity. Does this imply that the Augmented Kalman Filter approach in Section 5.7 is fundamentally different from the Exact Initial Kalman Filter described in Section 5.2? In the standard approach, we typically deal with power series expansions of $\kappa$ (where $\kappa \to \infty$), whereas Section 5.7 seems to treat the diffuse elements as fixed unknown parameters to be estimated via regression-like augmentation.

 

Furthermore, does using this augmented matrix initialization lead to changes in the standard Kalman filter recursions and the resulting log-likelihood function? According to the SAS documentation for VARMA and VARMAX modeling, the Kalman filtering approach evaluates the likelihood function using these equations:

  • Updating: $\hat{\mathbf{z}}_{t|t} = \hat{\mathbf{z}}_{t|t-1} + K_t \boldsymbol{\epsilon}_{t|t-1}$

  • Prediction: $\hat{\mathbf{z}}_{t|t-1} = F \hat{\mathbf{z}}_{t-1|t-1}$ and $P_{t|t-1} = F P_{t-1|t-1} F' + G \Sigma G'$

  • Log-likelihood: $\ell = -\frac{1}{2} \sum_{t=1}^T [\log |\Sigma_{t|t-1}| + (\mathbf{y}_t - \hat{\mathbf{y}}_{t|t-1})' \Sigma_{t|t-1}^{-1} (\mathbf{y}_t - \hat{\mathbf{y}}_{t|t-1})]$

Since the documentation presents these standard recursions, I am unclear on how the 'augmented state matrix equal to the identity' fits into these formulas during the diffuse phase. Is the log-likelihood function modified to account for the estimation of the initial diffuse state as described in Section 5.7.3 of the book?

 

I am very sorry if my questions are confusing..

sbxkoenk
SAS Super FREQ

Just a note (and not an answer to your questions) ...

I do not think the SAS Communities support LaTeX for mathematical typesetting.

This makes your equations for updating, prediction and log-likelihood quite unreadable.

Next time, it's better to capture part of your screen (the part with the LaTeX equations) as an image and then paste the image here.

 

BR, Koen

tugasakhir
Calcite | Level 5
Sorry to interrupt. I happened to be looking for a discussion about the estimation method for varma and I found this discussion. So, based on this, does it mean that the Kalman filter being implemented is an augmented Kalman filter? Because in section 5.7 Durbin & Koopman discuss the augmented Kalman filter.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Discussion stats
  • 5 replies
  • 618 views
  • 3 likes
  • 4 in conversation