似然比检验(LR)、Wald检验、拉格朗日检验(LM)都基于最大似然估计(MLE),本文以logit模型为例讨论三类检验的Stata实现。不当之处,请各位指正。
1、似然比检验
use http://www.ats.ucla.edu/stat/stata/faq/nested_tests, clear
*Likelihood-ratio test
logit hiwrite
estimates store m1
logit hiwrite female read math science
estimates store m2
lrtest m1 m2
当然我们可以使用另外一种方法来实现上述同样的结果:
*another method to compute LR test
logit hiwrite female read math science
scalar c=2*(e(ll)-e(ll_0))
scalar p_c = chi2tail(1,c)
di as txt 'chi2(4) = ' as result %9.2g `=c'
di as txt 'Prob > chi2 = ' asresult %9.4g `=p_c'
两者的结果是一样的:
当然logit模型本身也汇报了LR统计量:

本文介绍了在Stata中如何进行似然比检验、Wald检验和拉格朗日乘数检验,特别是在logit模型中的应用。通过实例展示了三种检验的命令和结果,并探讨了它们的差异。

984

被折叠的 条评论
为什么被折叠?



