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)
asymmetrical vector auto regression
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: asymmetrical vector auto regression
You're not setting !sc
Re: asymmetrical vector auto regression
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
Well, it is your program, so I can't say for sure. But I would guess somewhere inside your if statement.
Re: asymmetrical vector auto regression
:D thanx.
Problem resolved
Problem resolved
Who is online
Users browsing this forum: No registered users and 2 guests
