I am running the following program to select the lag order in a VAR. However, I get an illegal lag specification when I run it. Does anyone know why this is?
var var_{%k}
var_{%k}.ls 1 4 d_oil d_fao_d d_{%k}_cpif d_{%k}_fx @ dum1 dum2 dum3
var_{%k}.laglen(4,vname=vec_{%k})
scalar j=vec_{%k}(4)
var_{%k}.ls 1 j d_oil d_fao_d d_{%k}_cpif d_{%k}_fx @ dum1 dum2 dum3
var_{%k}.svar(rtype=patsr, namea=mata, nameb=matb, f0=n, nostop)
freeze(ir_{%k}) var_{%k}.impulse(24,m,imp=unit, se=a) d_{%k}_cpif @ d_fao_d
Rgds
Automatic VAR selection
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Automatic VAR selection
Which line causes the error?
-
camilogong
- Posts: 6
- Joined: Tue Jul 24, 2012 6:44 pm
Re: Automatic VAR selection
var_{%k}.ls 1 j d_oil d_fao_d d_{%k}_cpif d_{%k}_fx @ dum1 dum2 dum3
Aparently the command does not recognize the scalar j as a number. That is muy guess.
Aparently the command does not recognize the scalar j as a number. That is muy guess.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Automatic VAR selection
Try:
Code: Select all
var_{%k}.ls 1 {j} d_oil d_fao_d d_{%k}_cpif d_{%k}_fx @ dum1 dum2 dum3
-
camilogong
- Posts: 6
- Joined: Tue Jul 24, 2012 6:44 pm
Re: Automatic VAR selection
Thanks, that solves the problem.
Who is online
Users browsing this forum: No registered users and 2 guests
