Forecasting using SAS Forecast Server, SAS/ETS, and more

varmax independent variables time trend

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

varmax independent variables time trend

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
Super Contributor
Posts: 340

Re: varmax independent variables time trend

Posted in reply to yalexhouser

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;

?

View solution in original post


All Replies
Trusted Advisor
Posts: 1,228

Re: varmax independent variables time trend

Posted in reply to yalexhouser

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

New Contributor
Posts: 4

Re: varmax independent variables time trend

Posted in reply to yalexhouser

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
Super Contributor
Posts: 340

Re: varmax independent variables time trend

Posted in reply to yalexhouser

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;

?

New Contributor
Posts: 4

Re: varmax independent variables time trend

Posted in reply to user24feb

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.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 1086 views
  • 0 likes
  • 3 in conversation