各位老师好,我想请问二元选择模型的固定效应问题。我用的是非平衡面板数据,因变量是0-1变量(均值15.2%),需要确定应选择固定效应模型、随机效应模型还是混合模型。我首先删除了在所有年份y均为1或均为0的样本,因为这些样本不会进入固定效应模型,然后对剩下的样本进行豪斯曼检验。使用的命令如下,但是第一步就出现不收敛的结果。
命令:
固定效应结果不收敛:
我想请问老师:(1)我的命令是不是有问题啊?豪斯曼检验和LR检验时是否需要控制年度和行业呢?(2)其实我不止一次遇到logit固定效应不收敛(是否控制年度都遇到过),如果不收敛,我可以只在随机效应和混合效应之间选择吗?
希望得到老师的指点,非常感谢!
附数据结构如图:
问题1: 你写的命令本身没有问题,fe模型之所以不收敛是因为你的数据问题,利用fe模型的一个前提条件是数据在组内要有足够的变差(within variation),就是说你的数据在多期间没有变化,你可以用xtsum命令看下within变差是否很小。
如果数据没有问题,是可以利用hausman进行检验的,比如
- [/align][align=left]clear[/align][align=left]webuse union[/align][align=left]xtset idcode year[/align][align=left]xtsum[/align][align=left]xtlogit union age grade not_smsa south , renolog[/align][align=left]estimates store re[/align][align=left] [/align][align=left]xtlogit union age grade not_smsa south , fenolog[/align][align=left]estimates store fe[/align][align=left] [/align][align=left]hausman fe re[/align][align=left]
clear
webuse union
xtset idcode year
xtsum
xtlogit union age grade not_smsa south , renolog
estimates store re
xtlogit union age grade not_smsa south , fenolog
estimates store fe
hausman fe re


雷达卡





京公网安备 11010802022788号







