Page 1 of 1

VAR - specifying number of lags by referring to scalar/...

Posted: Fri Oct 17, 2014 8:09 am
by EllenEv
Hi,

I was wondering whether there is a way to specify the number of lags in a VAR in, say, a scalar (or any other object), and then to refer to it in the code?

Something like:

----------------------------
scalar L=3

Var test.ls 1 L variable1 variable2
---------------------------

Obviously the above is not working, otherwise I wouldn't have to post this thread :).

I have a lot of different VARs to estimate and this would make putting the results in tables so much more efficient.

Thanks!

Re: VAR - specifying number of lags by referring to scalar/.

Posted: Fri Oct 17, 2014 8:14 am
by EViews Gareth
Normally you'd use a program variable rather than a scalar object, so it would be:

Code: Select all

!L=3 Var test.ls 1 !L variable1 variable2
But if you really want to use a scalar object, you can do:

Code: Select all

scalar L=3 Var test.ls 1 {L} variable1 variable2