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
- /
- varmax independent variables time trend

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

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

Posted 07-21-2014 03:08 PM
(2138 views)

Hi,

I'm trying to estimate a simple VAR(2) model with a time trend.

Code is:

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2 = time_period / p=2 xlag=0;

run;

When I run this I get the following error message:

ERROR: The model is not full rank when the forecasts of regressors are computed. The VARMAX

procedure stopped processing further steps.

When I run the model without time period it works fine:

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2/ p=2 xlag=0;

run;

It also runs fine with one lag:

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2 = time_period / p=1 xlag=0;

run;

But two lags with a time trend fails... This is simulated data for the moment, so I'm pretty sure there's no colinearity between the regressors and the time trend,

What's going on here?

1 ACCEPTED SOLUTION

Accepted Solutions

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

If you try

Proc Varmax Data=sim_data;

Model spend1 spend2 prod1 prod2 / p=2 Trend=Linear; /* or Quad */

ID Time Interval=Month; /* if it is Month .. */

Run;

instead of

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2 = time_period / p=2 xlag=0;

run;

?

4 REPLIES 4

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

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

Yeah, that's what I figured, but it shouldn't be an issue, since xlag is equal to zero. I understand why it would be a problem with this model:

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2 = time_ p=2 xlag=1;

run;

since there would be no way to differentiate the impact of time_period(t) and time_period(t-1)

But that's not the model I'm running.

I feel like the SAS internals are running some model with multiple lagged exogenous variables in the forecasting step, instead of running the model I want.

If forecasting is going wrong, I'd like some way of stopping the VARMAX internals from attempting to forecast anything, since that's not of interest in this case.

Of course, via the frisch-Waugh theorem, I could just detrend the endogenous varialbes and then drop time_period from the VAR, but I'd prefer not to... especially as I've run into similar issues with VARMAX and dummy variables who are not in their own right colinear, but for whom a larger set of lagged values are.

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

If you try

Proc Varmax Data=sim_data;

Model spend1 spend2 prod1 prod2 / p=2 Trend=Linear; /* or Quad */

ID Time Interval=Month; /* if it is Month .. */

Run;

instead of

proc varmax data=sim_data noprint;

model spend1 spend2 prod1 prod2 = time_period / p=2 xlag=0;

run;

?

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

**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.