黃河泉 发表于 2017-7-10 16:51 
把你的指令与其他讯息一起发出来以供判断!
xthreg perinatal_mortality urbanization_rate infec ///
weather medical_bed doctor read_rate older_rate sex_ratio ///
natural_growth_rate sanitary_toilets clear_water ///
city_dh rural_dh disease_prevention per_gdp, rx(g_f) qx(g_f) thnum(1) grid(400)///
trim(0.01) bs(100 )
sjlog close,replace
xthreg perinatal_mortality urbanization_rate infec ///
weather medical_bed doctor read_rate older_rate sex_ratio ///
natural_growth_rate sanitary_toilets clear_water ///
city_dh rural_dh disease_prevention per_gdp , rx(g_f) qx(g_f) thnum(2) trim(0.01 0.05) grid(400) bs(100 100)
* triple threshold model given the result above
sjlog using xthreg2, replace
xthreg perinatal_mortality urbanization_rate infec ///
weather medical_bed doctor read_rate older_rate sex_ratio ///
natural_growth_rate sanitary_toilets clear_water ///
city_dh rural_dh disease_prevention per_gdp, rx(g_f) qx(g_f) thnum(3) grid(400) ///
trim(0.01 0.01 0.05) bs(100 100 100) thgiven nobslog noreg
sjlog close, replace
* plot the LR statistic vs threshold
sjlog using xthreg3, replace
_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)
sjlog close, replace
数据stata11格式数据