1. Hansen (2000) is "Sample splitting and threshold estimation. Econometrica 68 (3), 575-603". Hansen uploaded his code for estimation and testing in threshold models in Stata at:
It includes 2 files ado, Hansen2000.do, DurlaufJohnson.dta and readme.txt.
In Hansen (2000), it said that "This paper develops a statiscial theory for threshold estimation in the regression context. We allow for either cross-section or time series observations". But Hansen (2000) and Hansen2000.do only illustrate the procedure with cross-section observations (see data from DurlaufJohnson.dta).
2. This is my time series regression needed to run Hansen (2000) threshold test and threshold regress:
Follow codes in Hansen (2000)'s readme.txt, I try these codes but not working:

3. To more convenient for who interest and might help, I attach my data, called test.dta.
Moreover, I try the following codes (they seem no problem) but I think they are wrong:
I think time series data must be able to run as Hansen (2000) said, but I don''t firgure out the way.
HTML Code:
http://www.ssc.wisc.edu/~bhansen/progs/ecnmt_00.html
In Hansen (2000), it said that "This paper develops a statiscial theory for threshold estimation in the regression context. We allow for either cross-section or time series observations". But Hansen (2000) and Hansen2000.do only illustrate the procedure with cross-section observations (see data from DurlaufJohnson.dta).
2. This is my time series regression needed to run Hansen (2000) threshold test and threshold regress:
Follow codes in Hansen (2000)'s readme.txt, I try these codes but not working:
Code:
thresholdtest reer41_per L(1/4).reer41_per L(0/8).u_pro L(0/8).u_rea L(0/8).u_price, q(u_pro)
Code:
thresholdreg reer41_per L(1/4).reer41_per L(0/8).u_pro L(0/8).u_rea L(0/8).u_price, q(u_pro)
3. To more convenient for who interest and might help, I attach my data, called test.dta.
Moreover, I try the following codes (they seem no problem) but I think they are wrong:
Code:
thresholdtest reer41_per u_pro u_rea u_price, q(u_pro)
Code:
thresholdreg reer41_per u_pro u_rea u_price, q(u_pro)