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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- varmax independent variables time trend

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2014 03:08 PM

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?

Accepted Solutions

Solution

07-22-2014
09:06 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2014 09:06 AM

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;

?

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2014 05:12 PM

I think this is happening because of exogenous variable time_period that contains equally spaced values introducing a linearly dependency for higher lags.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2014 08:22 AM

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.

Solution

07-22-2014
09:06 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2014 09:06 AM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2014 09:20 AM

That is closer to what I was looking for, of course since this is simulated data there is not a date interval per-say type but I could create something in a datastep I'm sure.