Hi Gareth,
I would like to solve a VAR of 3 variables but instead of entering the 3 variable names in the command line I would like to create a group and run it for the group of variables, so that if I change any variable then I just need to change it in the group. I have tried as follows but it is not working.
Thanks,
Gloria
FOR %i series1 series2 series3
GROUP VARM1
VARM1.add {%i}
NEXT
FOR !j=1 to VARM1.@count 'counter for the variables in the group
%inamem1 = VARM1.@seriesname(!j)
FOR !i=1 to 200
SMPL %startestim %endestim_m
VAR VAR01_!i
VAR01_!i.ls 1 6 {%inamem1}_!i
NEXT
NEXT
FOR %i deu_expsit1 d_deuorder deu_prod_t1
GROUP VARM1
VARM1.add {%i}
NEXT
FOR !j=1 to VARM1.@count 'counter for the variables in the group
%inamem1 = VARM1.@seriesname(!j)
Use a group of variables in a VAR system
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
Re: Use a group of variables in a VAR system
I'm not sure why your code is not working (I haven't tried running it), but it is certainly possible to estimate a VAR using a group:
Code: Select all
create u 100
series y=nrnd
series x=nrnd
series z=nrnd
group vars x y z
var var01.ls 1 2 vars
Re: Use a group of variables in a VAR system
Thanks for your help Gareth, it was easier as I was doing.
Best,
Gloria
Best,
Gloria
Re: Use a group of variables in a VAR system
Hi again Gareth,
However, now I am trying to run a BVAR for a group of variables and it does not work (it is perfectly running for a standard EViews VAR), is this option not possible for a BVAR? Thanks, Gloria
FOR !i=1 to @dtoo(%finsoft)-@dtoo(%startoos_m)+1
GROUP VARM1_!i
FOR !j=1 to VARM1.@count 'counter for the variables in the group
%inamem1 = VARM1.@seriesname(!j)
VARM1_!i.ADD {%inamem1}_!i
NEXT
SMPL %startestim %endestim_m
BVAR(m=VAR1_!i, prior=!prior) !maxlag VARM1_!i
NEXT
However, now I am trying to run a BVAR for a group of variables and it does not work (it is perfectly running for a standard EViews VAR), is this option not possible for a BVAR? Thanks, Gloria
FOR !i=1 to @dtoo(%finsoft)-@dtoo(%startoos_m)+1
GROUP VARM1_!i
FOR !j=1 to VARM1.@count 'counter for the variables in the group
%inamem1 = VARM1.@seriesname(!j)
VARM1_!i.ADD {%inamem1}_!i
NEXT
SMPL %startestim %endestim_m
BVAR(m=VAR1_!i, prior=!prior) !maxlag VARM1_!i
NEXT
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Use a group of variables in a VAR system
Probably not for the Add-in, no.
Should work on the in-built BVAR estimation in EViews 8, though.
Should work on the in-built BVAR estimation in EViews 8, though.
Who is online
Users browsing this forum: No registered users and 2 guests
