楼主: nkzhh
108035 142

[程序分享] 用stata如何检验panel的自相关和异方差   [推广有奖]

41
蜻蜓点水 发表于 2007-8-29 02:59:00

XTGLS is a random effects model estimation method, in your case, you can use xtreg with vce(robust) option to correct for heteoscedasticity which uses Huber-White (1980) method.

42
唐伯小猫 发表于 2007-8-29 03:36:00

谢谢楼上大大,我再继续学习,如果有问题还会继续请教!

[此贴子已经被作者于2007-8-29 3:44:10编辑过]

心若向阳,无畏悲伤。

43
唐伯小猫 发表于 2007-8-29 03:54:00

请问 "XTGLS is a random effects model estimation method"

的出處在那個資料裡面?謝謝!

心若向阳,无畏悲伤。

44
唐伯小猫 发表于 2007-8-29 04:24:00

xtgls produces generalized least squares estimates for models of the form

yit = xitβ + it

where you may specify the variance structure of it. If you specify that it is independent for all i and

t, xtgls produces the same results as regress up to a small-sample degrees-of-freedom correction

applied by regress but not by xtgls.

You may choose among three variance structures concerning i and three concerning t, producing

a total of nine different models. Assumptions concerning i deal with heteroskedasticity and crosssectional

correlation. Assumptions concerning t deal with autocorrelation and, more specifically, AR(1)

serial correlation.

是這一段麼 ?

另外,vce(robust) option 給我的結果是一個很大的矩陣...

看了很多資料 ,都沒有進展.或許應該忽視異方差的檢驗?

心若向阳,无畏悲伤。

45
sigma38 发表于 2007-9-2 00:33:00
请问针对fixed effect模型,能否就用xttest3命令进行异方差的检验,用xtserial命令进行自相关的检验?谢谢。

46
zgf0910 发表于 2007-9-25 21:33:00
以下是引用蜻蜓点水在2007-8-29 2:27:00的发言:
"xtgls y x1 x2 x3, i(country) t(year) panels(correlated) corr(psar1)

This code corrects for heteroscedasticity across sections (or countries), it corrects for autocorrelation within countries (serial correlation) and contemporaneous correlation (spatial correlation) between countries as well. It is similar (but not exactly same) to Parks’ method in SAS."

请问蜻蜓点水:

我用xtgls y x1 x2 x3估计结果很多变量都不显著,但Wald chi2不大

但若我用xtgls y x1 x2 x3,p(h) c(p)估计结果使得刚才不显著的变量都在1%水平显著,Wald Chi2达到几十万。这如何解释呢?

谢谢

微博开通,欢迎关注http://weibo.com/1624724810

47
arlionn 在职认证  发表于 2007-9-26 08:21:00

xtgls 的理论解释可以参考Greene(2000,4th,chp15);

个人认为它比较适合“大T小N”或N和T相当的面板数据,而对于使用最为广泛的“大N小T”型面板该命令并不适用。可以考虑使用 xtscc 命令得到异方差、序列相关、截面相关稳健型标准误。

fintit xtscc

命令的说明参考 stata journal, 2007, vol3. 在论坛中可以搜索得到该文档。

48
imwaitingfor 发表于 2008-3-19 12:03:00

同意47楼观点。xtgls 主要适合大T小N,不适合大N小T。xtscc 不能用作randon effect. 

 xtscc produces Driscoll and Kraay (1998) standard errors for coefficients estimated by pooled OLS/WLS or
    fixed-effects (within) regression. depvar is the dependent variable and varlist is an (optional) list of
    explanatory variables.

    The error structure is assumed to be heteroskedastic, autocorrelated up to some lag, and possibly correlated
    between the groups (panels). These standard errors are robust to very general forms of cross-sectional
    ("spatial") and temporal dependence when the time dimension becomes large. However, because this
    nonparametric technique of estimating standard errors does not place any restrictions on the limiting
    behavior of the number of panels, the size of the cross-sectional dimension in finite samples does not
    constitute a constraint on feasibility - even if the number of panels is much larger than T.  Nevertheless,
    because the estimator is based on an asymptotic theory one should be somewhat cautious with applying this
    estimator to panel datasets with a large number of groups that have only a short number of observations.

49
新月又如眉 发表于 2008-5-5 10:46:00
学习了!那如果是大N小T的,应该用什么命令纠正异方差和自相关呢?

50
cpine2000 发表于 2008-5-6 09:09:00
xtscc 可以。 

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-25 04:49