蓝色 发表于 2015-10-25 08:36 
谁说的作图命令是
matplot???
你好,我也是初学,很多不懂之处,请多多指教。我现在把王老师的程序贴出来,希望得到解答:
Examples
Setup
. use hansen1999
Estimate a single-threshold model
. xthregi q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(1) trim(0.01) grid(400) bs(300)
Estimate a triple-threshold model given the estimated result above
. xthregi q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) bs(0 300 300) thgiven
. xthregi q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) grid(400) bs(300 300 300)
Estimate a triple-threshold model directly
. xthregi q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01 0.05) bs(300 300 300)
绘图:
Plot the confidence interval using likelihood-ratio (LR) statistics
. _matplot e(LR21), columns(1 2) yline(7.35, lpattern(dash)) connect(direct) msize(small) mlabp(0) mlabs(zero) ytitle("LR Statistics") xtitle("First Threshold") recast(line) name(LR21) nodraw
. _matplot e(LR22), columns(1 2) yline(7.35, lpattern(dash)) connect(direct) msize(small) mlabp(0) mlabs(zero) ytitle("LR Statistics") xtitle("Second Threshold") recast(line) name(LR22) nodraw
. graph combine LR21 LR22, cols(1)
Author
Qunyong Wang
Institute of Statistics and Econometrics
Nankai University
Tianjin, China
QunyongWang@outlook.com