panel threshold regression

For questions regarding programming in the EViews programming language.

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

honeysito
Posts: 3
Joined: Sun Nov 06, 2011 9:13 pm

panel threshold regression

Postby honeysito » Sun Nov 06, 2011 9:30 pm

I am using Eviews 7 and trying to estimate a panel threshold regression with the threshold value changing within an interval. So I ran the first equation with the threshold value at z=5 as:

equation eq5.LS(?,WGT=CXDIAG,COV=CXWHITE,NODF,UNBALSUR) y y(-1) x1*(z>5) x1*(z<5) x2*(z>5) x2*(z<5) z*(z>5) z*(z<5)

now I want to write a program that will estimate this equation and repeat 100 times, each time increasing the threshold by 1, that is the next equation would look like

eq6.LS(?,WGT=CXDIAG,COV=CXWHITE,NODF,UNBALSUR) y y(-1) x1*(z>6) x1*(z<6) x2*(z>6) x2*(z<6) z*(z>6) z*(z<6)

and the third would change the 6 to 7 and so on.

Any help with this would be much appreciated.
Thanks

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: panel threshold regression

Postby EViews Glenn » Mon Nov 07, 2011 10:33 am

Something like

Code: Select all

for !i=5 to 100 equation eq!i.LS(?,WGT=CXDIAG,COV=CXWHITE,NODF,UNBALSUR) y y(-1) x1*(z>!i) x1*(z<!i) x2*(z>!i) x2*(z<!i) z*(z>!i) z*(z<!i) next
As an aside, shouldn't one of your inequality comparisons be a "or equal" comparison?

honeysito
Posts: 3
Joined: Sun Nov 06, 2011 9:13 pm

Re: panel threshold regression

Postby honeysito » Mon Nov 07, 2011 2:03 pm

Thanks a million, it worked!

The only hitch now is that when the program runs it does not close the window of the individual equations it opens and so the program stops after a while and says "too many windows open". Is there a command I can insert to get it to close the equation window after each equation is estimated?
Thanks


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests