lag length criteria test in batch
Posted: Sat May 22, 2010 8:36 pm
I am using the following code to take all series in my workfile and run SVARs on each.
group var_group *
for !i=1 to var_group.@count
%name = var_group.@seriesname(!i)
var {%name}_VAR.ls 1 2 {%name} national mb @
{%name}_VAR.append(svar) @e1 = C(1)*@e1 + C(2)*@u1
{%name}_VAR.append(svar) @e2 = C(3)*@e1 + C(4)*@u2
{%name}_VAR.append(svar) @e3 = C(5)*@e2 + C(6)*@u3
next
Here, I have specified the lag interval as 1 2, but I would like for the program to choose the results of a lag length criteria test (Schwarz, for example) for each individual test. Is there a way to do this?
Thanks!
Christian
group var_group *
for !i=1 to var_group.@count
%name = var_group.@seriesname(!i)
var {%name}_VAR.ls 1 2 {%name} national mb @
{%name}_VAR.append(svar) @e1 = C(1)*@e1 + C(2)*@u1
{%name}_VAR.append(svar) @e2 = C(3)*@e1 + C(4)*@u2
{%name}_VAR.append(svar) @e3 = C(5)*@e2 + C(6)*@u3
next
Here, I have specified the lag interval as 1 2, but I would like for the program to choose the results of a lag length criteria test (Schwarz, for example) for each individual test. Is there a way to do this?
Thanks!
Christian