I have performed the process you provided for Tsay(1998) "Testing and Modeling Multivariate Threshold Models" examples,
http://www.estima.com/forum/viewtopic.php?f=8&t=1004
However, I cannot get the same result as the paper done at "U.S. Interest Rates" example and how to estimate the threshold value by minimize AIC by process? just like Table 8 in Tsay(1998) paper.
Table8:

- Code: Select all
@gridseries(from=-.30,to=.05,n=80,pts=ngrid) rgrid
*
compute bestaic=%na
do i=1,ngrid-19
do j=i+20,ngrid
sweep(group=(thresh<rgrid(i))+(thresh<rgrid(j)),var=homo)
# g3year g3month
# constant g3year{1 to p} g3month{1 to p}
compute thisaic=-2.0*%logl+2.0*%nregsystem
if .not.%valid(bestaic).or.thisaic<bestaic
compute bestaic=thisaic,bestlower=rgrid(i),bestupper=rgrid(j)
end do j
end do i
*
I don't know exactly why set i=1,ngrid-19 and j=i+20
how to determine 19,20 and what's it means?
thanks for helping
