my保护色 发表于 2021-9-20 18:08 
请问双门限你解决了吗
参考代码https://bbs.pinggu.org/thread-6361932-1-1.html
- xthreg y x , rx(x1) qx(x2) thnum(2) grid(400) trim(0.05 0.05) bs(100 100) r
- // 画双门槛图
- _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(L2a) 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(L2b) nodraw
- graph combine L2a L2b, cols(1)
复制代码确定运行双门槛的xthreg,仍出现
matrix should have at least 2 columns,解决办法是先运行单门槛xthreg,再运行双门槛xthreg,再用上面双门槛图的代码。
我就是只运行双门槛xthreg和图的代码后,出现错误的,参考https://bbs.pinggu.org/thread-7000192-1-1.html