作者cewjlhwj (嗨你好)
看板Economics
标题Re: [请益] cross-sectional 与 time-series 的 da …
时间Sat May 17 22:43:18 2008
以下讨论的主要问题都是 iid 的假设和 OLS model
因为panel data通常是 大N小T
the random sampling assumption does allow for temporal correlation.
assume
random sampling in the
cross section dimension.
The dependentce in the
time series dimension can be entirely
unrestricted.
但前提是,大N小T。所以如果sample不是大N小T,就麻烦了,不能 justify 上述的假设
如果是N和T数目差不多,目前的讨论也不多,wooldridge(2002)在他的书
econometrics analysis of cross section and panel data p.7有介绍相关的文章。
就我所知Panel data可能有的问题
1. multicollinearity
这在panel data下照常test,把有问题的变数去掉吧。
通常regression model 都会直接 drop(test) perfectly correlated variables
但我的经验是 near correlated 就不一定了
在stata下可以使用coldiag2,
参考文章:Belsley(1991), conditioning diagnostics, collinearity
and weak data in regression
2. time-series方面
如上述的讨论,model 通常 allow for temporal correlation
Wooldridge(2002) 提出一个 serial correlation in panel data 的检定
他的假设很简单,很好用。
Drukker, D. M. (2003) 提出这个检定方式
在各种不同假设的模型下perform well。
在Stata中已经有人写出这个程式了 (xtserial)
可以用 robust to arbitrary autocorrelation 的 estimator
估计 autocorrelation 的 data
但这类的kernel estimator(像是单纯时间序列的作法, ex: newey-west)
the asymptotics rely on the
number of
periods going off to infinity
又是因为现在的data大部分是大N小T,所以要用要小心,不常用。
3. cross-sectional方面
contemparaneous correlation(不符合 E(x'it uit) =0的假设)
也就是指同一期t下的correlation
stata中有以下两个test
xtcsd (for small T large N)
xttest2 (for large T small N)
如果发现有问题
可能是
3.1 within-group correlation
指不同i可能是处於同一个群体中,所以他们会相关。
例如: 好几个不同的人(i)同时是一家公司的员工,则这些i的行为可能会
被同一家公司的特别福利、政策、无法观察到的文化因素而影响
实际操作上可以用cluster解决,the asymptotics rely on
the number of clusters
going off to infinity
很容易做,但clusters要够多,我看过一个人在stata的讨论版说
50 or more being a good rule of thumb
或是调整资料,例如:aggregate 同一个firm下个人的资料,
使用each firm作为不同 i,
这样可以解决within-group correlation。但可能会面临下一个问题。
3.2 spatial correlation
若每个 i 是很大的区域资料,不同 i 之间的变数可能会互相影响。
例如:i是指美国不同州的资料,一个州的减税政策会影响另外一个州的变数。
这个实际操作上很难解决,通常忽略。
4. groupwise heteroskedasticity
变异数齐一性
stata中可以用 xttest3 test fixed effect的model是否符合 Ho: homoskedasticity
如果拒绝Ho,用robust的指令,就会有好的estimator。
原则上 heteroskedasticity multicollinearity autocorrelation
comtemporaneous correlation
在panel data下都有专门的test,理论上和cross-section或time-series时差不多,
但panel data有时候要处理更多假设。
当然用不同的model(ex:fixed effect or ramdom effect),对data的假设就不同,
可能需要不同的test,估计结果才会比较正确
我的作法是先找到统计软体里专门的test检验data有无上述问题,
如果发现问题,
再利用robust estimator估计出consistent 和 efficient的估计值
建议看看wooldridege(2002)的书,是本关於panel data很好的书,
要不然找到test很容易误解,也不知道该用什麽model解决,
用错了估计的结果就不正确
上述的内容和主要说法大部分直接翻译於wooldridge(2002)的
econometrics analysis of cross section and panel data,
以及我在stata讨论版蒐集的心得,有些地方(尤其是time-series方面)
我还有些疑惑,如果有误很抱歉。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.109.230.252
※ 编辑: cewjlhwj 来自: 140.109.230.252 (05/17 22:53)
1F:推 kevensandra:这篇很用心 推一个!! 59.105.111.223 05/18 00:33
2F:推 s3011:还有附stata指令 真贴心 207.237.118.51 05/18 04:47
3F:推 LoIn:恩 谢谢你, 很多内容刺激我进一步思考.. 140.119.206.2 05/18 16:44
4F:推 LoIn:不过我手头的是limdep.. 140.119.206.2 05/18 16:59
※ Tinderstick:转录至看板 NCUECON98 07/19 04:31