最新课程:
Stata初级班:http://www.peixun.net/view/307_detail.html
Stata高级班:http://www.peixun.net/view/308_detail.html
Stata论文班:http://www.peixun.net/view/1135.html
引言 +范例 +使用方法+程序与数据
1、引言
问题:对于 Panel Data 而言,在检验 FE 和 RE 何者更为适用时,传统的 Hausman (1978) 检验存在诸多局限。例如,经常出现负值(https://bbs.pinggu.org/thread-355027-1-1.html);无法处理存在异方差的情形。 Cameron and Trivedi (2009, pp.429) 建议采用 Bootstrap 进行 Hausman 检验,能够从一定程度上克服上述问题。
(Reference: Cameron, A., P. Trivedi. Microeconometrics Using Stata[M]. Stata Press, 2009.)
Stata程序:为此,我基于 Cameron and Trivedi (2009, pp.429) 介绍的方法编写了 -hausmanxt- 命令,可以很方便地执行这一基于 Bootstrap 的 Hausman 检验。
2、 Hausman 范例:
Bootstrap Hausman Test
webuse invest2.dta, clear
xtset company time
hausmanxt market stock invest, reps(200) seed(13579)
Bootstrapping ... ...
Bootstrap Hausman Test
N = 5 Number of obs = 100
T = 20 Replications = 200
---- Coefficients ----
| (b) (B) (b-B) Bootstrap
| FE RE Difference S.E.
-------------+----------------------------------------------------------------
stock | -.6763434 -.7981618 .1218184 .9945177
invest, | 3.05273 3.847014 -.794284 2.272238
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg, fe
B = inconsistent under Ha, efficient under Ho; obtained from xtreg, re
Test: Ho: difference in coefficients not systematic
chi2(2) = (b-B)' [Var(b-B)]^(-1) (b-B)
= 0.37
Prob>chi2 = 0.8321
3、使用方法:
1. 请将 hausmanxt.ado, hausmanxt_test.ado 和 hausmanxt.sthlp 放置于 stata12\ado\base\h 文件夹下;
2. 输入 help hausmanxt 可以查看帮助文件;
3. 范例中使用的数据文件为 invest2.dta.
程序尚不完善,欢迎提出修改建议:
连玉君, E-mail: arlionn@163.com
相关程序链接—
hausmanxt 基于 Bootstrap 的 Hausman 检验命令 https://bbs.pinggu.org/thread-2763156-1-1.html
hhi5 生成赫芬达尔指数的Stata命令 https://bbs.pinggu.org/thread-2764997-1-1.html
ttable3 组间均值和中位数差异检验列表命令 https://bbs.pinggu.org/thread-2765062-1-1.html
winsor2 一次性对多个变量执行 winsor 缩尾处理 https://bbs.pinggu.org/thread-2807843-1-1.html
最新课程:
Stata初级班:http://www.peixun.net/view/307_detail.html
Stata高级班:http://www.peixun.net/view/308_detail.html
Stata论文班:http://www.peixun.net/view/1135.html
5、程序和数据:(new,下面那个可以忽略)
[attach]1449578[/attach](new)(点击: -hausmanxt- 基于 Bootstrap 的 Hausman 检验 )