Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Need help writing MODEL statement in PROC VARMAX

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-29-2014 12:18 PM
(1850 views)

I have created an econometric vector time series with many variables (all endogenous) and quarterly observations over many years. I am trying to create a VARMA model for the variables.

I was successful in allowing SAS to create a model for me using the MINIC option in the MODEL statement. The chosen model was VAR(1). Unfortunately, significant autocorrelation remains at lag 4 (= 1 year). Thus I would like to specify a larger model and decide for myself which terms are significant. The SAC and SPAC of the individual variables suggest the correct model is a subset of VARMA(8,8), or more precisely, VARMA(2,2)(2,2)s. I have used variants of the following:

MODEL z1 z2 z3 z4 zstar5 z6 zstar7 z8 z9 z10 z11 / P = (1,2,4,8) Q = (1,2,4,8) METHOD = ML NSEASON = 4 PRINTALL;

or

MODEL z1 z2 z3 z4 zstar5 z6 zstar7 z8 z9 z10 z11 / P = 4 Q = 4 METHOD = ML NSEASON = 4 PRINTALL;

or

MODEL z1 z2 z3 z4 zstar5 z6 zstar7 z8 z9 z10 z11 / P = (1,4) Q = (1,4) METHOD = ML NSEASON = 4 PRINTALL;

In each case I get the error message:

ERROR: Improper initial values for the parameters estimates in the nonlinear optimization.

But I didn't initialize anything! I seem to be following the SAS documentation for the PROC VARMAX MODEL statement verbatim, but cannot create a model per my specifications. Any ideas? Thanks for your input!

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I thought my problem might be the specification of seasonality in the model. I took a chance and removed the NSEASON = 4 option from my MODEL statement, but I got the same error.

Then I tried simplifying even further. The SACs and SPACs suggest that the correct model might be VAR(1)(1)s. Therefore I deleted the specification of Q (effectively setting it to 0), and included just P = (1,4). Now PROC VARMAX is running - and running - and running...

Had to stop SAS. The problem is METHOD = ML. PROC VARMAX runs well specifying only P, together with METHOD = LS.

This still does not solve my problem. I now have a working model of type VAR(5). However, I still want to include a MA(1) term. How can I do that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Surak,

You seem to have identified some of the issues. May I ask whether you have tried different optimizers?

Also, which version of ETS are you working with? There have been MAJOR improvements to the speed and likelihood of convergence in VARMAX in recent releases (12.3 or later)

Also, have you tried the METHOD=LS option with your MA term?

Thanks-Ken

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks, Ken. I should have clarified that I'm using SAS 9.3 - just installed in May.

I believe I did try METHOD = LS with the MA term, but I'm overridden by this:

When the ECM=, PRIOR=, and Q= options and the GARCH statement are specified, the default ML method is used regardless of the method given by the METHOD= option.

Hal

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I'd like to provide some closure to the question above. After much experimentation, I discovered that SAS would hang up on even the simplest VMA(1) model. I should clarify that this was a dataset with some 160 observations in 11 variables. Estimating the parameters of a MA model, even of order 1, for a dataset of this size and complexity appears to have overwhelmed my computer's resources.

The story does have a happy ending, because the data was described very accurately by a VAR(5) model. Terms of order up through 5 were significant, and there was no remaining significant autocorrelation or partial autocorrelation in the residuals.

The lesson seems to be that it is easier to estimate the parameters of an AR model than a MA model, which may explain the prevalence of the former in the economic references I've read. Happily, predictions were accurate, and residual SAC and SPAC non-significant.

**Don't miss out on SAS Innovate - Register now for the FREE Livestream!**

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.