Page 1 of 1

panel threshold regression

Posted: Sun Nov 06, 2011 9:30 pm
by honeysito
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

Re: panel threshold regression

Posted: Mon Nov 07, 2011 10:33 am
by EViews Glenn
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?

Re: panel threshold regression

Posted: Mon Nov 07, 2011 2:03 pm
by honeysito
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