asymmetrical vector auto regression

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

alok_fes
Posts: 9
Joined: Fri Feb 08, 2013 2:05 am

asymmetrical vector auto regression

Postby alok_fes » Sun Jan 19, 2014 11:12 am

I have one program on asymmetrical vector auto regression where each variable can have different lags. my program run on pricncipal cpmponents derived from IIP, INFLATION, MONEY and INTEREST RATE.

My problem is that below program is not showing final equations with best lag but with maximum lag.
please help


equation eqfavar
equation eq2
equation eq3
equation eq4
equation eq5
!maxlags=4
!bestlaga=0
!bestlagb=0
!bestlagc=0
!bestlagd=0
!bestlage=0
!sc=99999999
!scnew=9999999
for !a=1 to !maxlags
for !b=1 to !maxlags
for !c=1 to !maxlags
for !d=1 to !maxlags
for !e=1 to !maxlags
eqfavar.ls(cov=hac) grgdp c grgdp(-1 to -!a) pciip1(-1 to -!b) pcinflation1(-1 to -!c) pcinterest1(-1 to -!d) pcmoney1(-1 to -!e)
eq2.ls(cov=hac) pciip1 c grgdp(-1 to -!a) pciip1(-1 to -!b) pcinflation1(-1 to -!c) pcinterest1(-1 to -!d) pcmoney1(-1 to -!e)
eq3.ls(cov=hac) pcinflation1 c grgdp(-1 to -!a) pciip1(-1 to -!b) pcinflation1(-1 to -!c) pcinterest1(-1 to -!d) pcmoney1(-1 to -!e)
eq4.ls(cov=hac) pcinterest1 c grgdp(-1 to -!a) pciip1(-1 to -!b) pcinflation1(-1 to -!c) pcinterest1(-1 to -!d) pcmoney1(-1 to -!e)
eq5.ls(cov=hac) pcmoney1 c grgdp(-1 to -!a) pciip1(-1 to -!b) pcinflation1(-1 to -!c) pcinterest1(-1 to -!d) pcmoney1(-1 to -!e)
!scnew=eqfavar.@sc+eq2.@sc+eq3.@sc+eq4.@sc+eq5.@sc
if !scnew<!sc then
!bestlaga=!a
!bestlagb=!b
!bestlagc=!c
!bestlagd=!d
!bestlage=!e
endif
next
next
next
next
next
eqfavar.ls(cov=hac) grgdp c grgdp(-1 to -!bestlaga) pciip1(-1 to -!bestlagb) pcinflation1(-1 to -!bestlagc) pcinterest1(-1 to -!bestlagd) pcmoney1(-1 to -!bestlage)
eq2.ls(cov=hac) pciip1 c grgdp(-1 to -!bestlaga) pciip1(-1 to -!bestlagb) pcinflation1(-1 to -!bestlagc) pcinterest1(-1 to -!bestlagd) pcmoney1(-1 to -!bestlage)
eq3.ls(cov=hac) pcinflation1 c grgdp(-1 to -!bestlaga) pciip1(-1 to -!bestlagb) pcinflation1(-1 to -!bestlagc) pcinterest1(-1 to -!bestlagd) pcmoney1(-1 to -!bestlage)
eq4.ls(cov=hac) pcinterest1 c grgdp(-1 to -!bestlaga) pciip1(-1 to -!bestlagb) pcinflation1(-1 to -!bestlagc) pcinterest1(-1 to -!bestlagd) pcmoney1(-1 to -!bestlage)
eq5.ls(cov=hac) pcmoney1 c grgdp(-1 to -!bestlaga) pciip1(-1 to -!bestlagb) pcinflation1(-1 to -!bestlagc) pcinterest1(-1 to -!bestlagd) pcmoney1(-1 to -!bestlage)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: asymmetrical vector auto regression

Postby EViews Gareth » Sun Jan 19, 2014 1:12 pm

You're not setting !sc

alok_fes
Posts: 9
Joined: Fri Feb 08, 2013 2:05 am

Re: asymmetrical vector auto regression

Postby alok_fes » Sun Jan 19, 2014 8:18 pm

Please help by mentioning line of program command to set !sc

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: asymmetrical vector auto regression

Postby EViews Gareth » Sun Jan 19, 2014 8:44 pm

Well, it is your program, so I can't say for sure. But I would guess somewhere inside your if statement.

alok_fes
Posts: 9
Joined: Fri Feb 08, 2013 2:05 am

Re: asymmetrical vector auto regression

Postby alok_fes » Mon Jan 20, 2014 11:32 am

:D thanx.
Problem resolved


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests