黃河泉 发表于 2018-5-16 17:52
这个问题我回答过很多次,请见 https://www.ssc.wisc.edu/~bhansen/progs/progs_threshold.html。
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input double(y x lnx) byte control1 long control2 double control3
- 1.22483423749247 3.05344748226492 1.11627127434039 7 586 .183058
- 1.0635593220339 5.80579890899997 1.7588572299699 7 1979 .003214
- 1.12216404886562 2.62920104974876 .966680016672669 7 1039 -.433122
- 1.33603238866397 4.05575571533839 1.40013703650134 7 996 .097636
- 1.20833333333333 4.24321071730683 1.44532022732663 6 601 -.237327
- 1.28314121037464 1.40251520094753 .338267196821241 7 669 .111282
- 1.24520069808028 3.5392 1.26390071290582 7 224 .008583
- 1.19767441860465 3.78943786105245 1.33221768647155 7 1176 .027274
- 1.10946012877662 4.19039551991615 1.43279512564038 7 1614 .050565
- 1.16334072431633 3.78873259542688 1.33203155562858 7 353 .144526
- 1.14873417721519 2.58949784925014 .951463976315772 6 438 .021838
- 1.14247311827957 1.30310680469911 .264751263086721 7 1219 .047331
- 1.12164948453608 6.19312152946719 1.82343924544612 7 1722 .031227
- 1.34422310756972 7.85491749817782 2.06113976855603 7 860 .015241
- 1.20585457979226 4.89283525223929 1.58777194164802 7 1210 .042594
- 1.09218436873748 4.65964776565783 1.53893985851202 7 687 .045198
- 1.16694772344013 2.34061535071827 .85041386519138 7 344 .040594
- 1.13626075147125 4.7268548346392 1.55326004151073 7 411 .067277
- 1.16511387163561 5.62513084976997 1.72724421000125 7 195 .06812
- 1.21473443746431 5.03771946040233 1.61695349166427 7 874 .045895
- end
Listed 20 out of 304 observations