个体固定效应模型能用xtgls吗

苹果/安卓/wp
积分 2202, 距离下一级还需 23 积分
权限: 自定义头衔, 签名中使用图片, 设置帖子权限, 隐身
道具: 彩虹炫, 雷达卡, 热点灯, 雷鸣之声, 涂鸦板, 金钱卡, 显身卡, 匿名卡, 抢沙发, 提升卡下一级可获得
权限: 设置回复可见道具: 沉默卡
购买后可立即获得
权限: 隐身
道具: 金钱卡, 雷鸣之声, 彩虹炫, 雷达卡, 涂鸦板, 热点灯
开心签到天数: 1 天连续签到: 1 天[LV.1]初来乍到
我想用考虑固定效应的xtgls命令来处理面板数据,先输入命令xtdata y x,fe,屏幕显示 data in memory would be lost, 再输入xtdata ,fe clear才有效 再用xtgls y x,p(c) c(ar1)来估计,得到的结果Wald chi2(7) = 1.81e+07,z检验值都非常大,最小的也达91,最大的是716, 请问大家,这是怎么回事?这个结果有效么?
载入中......
你好,请问去除个体效应的问题解决了么?希望得到您的指点,谢谢!
无限扩大经管职场人脉圈!每天抽选50位免费名额,现在就扫& 论坛VIP& 贵宾会员& 可免费加入
加入我们,立即就学扫码下载「就学」app& Join us!& JoinLearn&
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
如有投资本站或合作意向,请联系(010-);
邮箱:service@pinggu.org
投诉或不良信息处理:(010-)
京ICP证090565号
京公网安备号
论坛法律顾问:王进律师Stata对面板数据模型的估计
首先对面板数据进行声明:前面是截面单元,后面是时间标识:
tsset company year
tsset industry year
产生新的变量:gen newvar=human*lnrd
产生滞后变量Gen fiscal(2)=L2.fiscal
产生差分变量Gen fiscal(D)=D.fiscal
描述性统计:
xtdes :对Panel Data截面个数、时间跨度的整体描述
Xtsum:分组内、组间和样本整体计算各个变量的基本统计量
xttab 采用列表的方式显示某个变量的分布
Stata中用于估计面板模型的主要命令:xtreg
xtreg depvar [varlist] [if exp] , model_type [level(#) ]
type&&&&&&&&&&&&&
be&&&&&&&&&&&&
Between-effects estimator
fe&&&&&&&&&&&&&
Fixed-effects estimator
re&&&&&&&&&&&&
GLS Random-effects estimator
pa&&&&&&&&&&
GEE population-averaged estimator
mle&&&&&&&
Maximum-likelihood Random-effects estimator
主要估计方法:
xtreg:&& Fixed-, between- and
random-effects, and population-averaged linear models
xtregar:Fixed- and random-effects linear models with an AR(1)
disturbance
xtpcse :OLS or Prais-Winsten models with panel-corrected standard
xtrchh :Hildreth-Houck random coefficients models
xtivreg :Instrumental variables and two-stage least squares for
panel-data models
xtabond:Arellano-Bond linear, dynamic panel data estimator
xttobit :Random-effects tobit models
xtlogit : Fixed-effects, random-effects, population-averaged logit
xtprobit :Random-effects and population-averaged probit
xtfrontier :Stochastic frontier models for panel-data
xtrc gdp invest culture edu sci health social admin,beta
xtreg命令的应用:
声明面板数据类型:tsset& sheng t
描述性统计:xtsum gdp invest sci admin
1.固定效应模型估计:
xtreg& gdp invest culture sci health admin
固定效应模型中个体效应和随机干扰项的方差估计值(分别为sigma u 和sigma e),二者之间的相关关系(rho)
最后一行给出了检验固定效应是否显著的F 统计量和相应的P 值
2.随机效应模型估计:
xtreg& gdp invest culture sci health admin
检验随机效应模型是否优于混合OLS 模型:
在进行随机效应回归之后,使用xttest0
检验得到的P 值为0.0000,表明随机效应模型优于混合OLS 模型
3. 最大似然估计Ml:
xtreg& gdp invest culture sci health admin
techno,mle
Hausman检验
Hausman检验究竟选择固定效应模型还是随机效应模型:
第一步:估计固定效应模型,存储结果
xtreg& gdp invest culture sci health admin
est store fe
第二步:估计随机效应模型,存储结果
xtreg& gdp invest culture sci health admin
est store re
第三步:进行hausman检验
hausman fe
Hausman检验量为:
H=(b-B)&[Var(b)-Var(B)]-1(b-B)~x2(k)
Hausman统计量服从自由度为k的χ2分布。当H大于一定显著水平的临界值时,我们就认为模型中存在固定效应,从而选用固定效应模型,否则选用随机效应模型
如果hausman检验值为负,说明的模型设定有问题,导致Hausman
检验的基本假设得不到满足,遗漏变量的问题,或者某些变量是非平稳等等
可以改用hausman检验的其他形式:
hausman fe, sigmaless
对于固定效应模型的异方差检验和序列相关检验:
Xtserial gdp invest culture sci health admin techno
异方差检验:
xtreg& gdp invest culture sci health admin
xttest3 (Modified Wald statistic for groupwise heteroskedasticity
in fixed effect model)
ssc install&
xttest3(若发现xttest3命令不可用,则先运行此语句)
随机效应模型的序列相关检验:
xtreg& gdp invest culture sci health admin
Xttest1用于检验随机效应(单尾和双尾) 、一阶序列相关以及两者的联合显著
检验结果表明存在随机效应和序列相关,而且对随机效应和序列相关的联合检验也非常显著
可以使用广义线性模型xtgls对异方差和序列相关进行修正:
xtgls& gdp invest culture sci health admin techno,
panels(hetero),修正异方差
xtgls& gdp invest culture sci health admin techno,
panels(correlated),修正依横截面而变化的异方差
xtgls& gdp invest culture sci health admin techno,
panels(hetero) corr(ar1),修正异方差和一阶序列相关ar(1)
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。苹果/安卓/wp
积分 422, 距离下一级还需 28 积分
权限: 自定义头衔, 签名中使用图片
道具: 彩虹炫, 雷达卡, 热点灯, 雷鸣之声, 涂鸦板, 金钱卡, 显身卡, 匿名卡下一级可获得
道具: 抢沙发
购买后可立即获得
权限: 隐身
道具: 金钱卡, 雷鸣之声, 彩虹炫, 雷达卡, 涂鸦板, 热点灯
看到文献中,hauseman检验完了用可行广义最小二乘法计量,应该是xtgls吧,那这和固定效应一样么,欢迎大家讨论
载入中......
给一个实例相互学习: . xtgls lny lnK lnH lnh
Cross-sectional time-series FGLS regression Coefficients: generalized least squaresPanels: homoskedasticCorrelation: no autocorrelation Estimated covariances = 1 Number of obs = 580Estimated autocorrelations = 0 Number of groups = 29Estimated coefficients = 4 Time periods = 20 Wald chi2(3) = 41817.64Log likelihood = 297.2711 Prob & chi2 = 0.0000 ------------------------------------------------------------------------------ lny | Coef. Std. Err. z P&|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnK | . 0.000 .58975 lnH | . 0.000 .14921 lnh | . 0.000 .4321 _cons | -.3 0.000 -1.026403 -.5806678------------------------------------------------------------------------------
再给一个实例: . xtgls lny lnK lnH lnh lnneng1 lnceng1 r3 ,iglsIteration 1: tolerance = 0 Cross-sectional time-series FGLS regression Coefficients: generalized least squaresPanels: homoskedasticCorrelation: no autocorrelation Estimated covariances = 1 Number of obs = 580Estimated autocorrelations = 0 Number of groups = 29Estimated coefficients = 7 Time periods = 20 Wald chi2(6) = 43245.79Log likelihood = 306.8788 Prob & chi2 = 0.0000 ------------------------------------------------------------------------------ lny | Coef. Std. Err. z P&|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- lnK | . 0.000 .45531 lnH | . 0.000 .45491 lnh | . 0.012 .75314 lnneng1 | . 0.002 .2456 lnceng1 | -.3 0.001 -.3335839 -.0829807 r3 | -.7 0.000 -.0987566 -.0299443 _cons | -.4 0.000 -.897652 -.370966------------------------------------------------------------------------------ [此贴子已经被作者于 16:17:10编辑过]
楼上显示的Panels:homoskedastic,这样的话是不是需要调整异方差,即:xtgls lny lnk lnH lnh , panels(h)
无限扩大经管职场人脉圈!每天抽选50位免费名额,现在就扫& 论坛VIP& 贵宾会员& 可免费加入
加入我们,立即就学扫码下载「就学」app& Join us!& JoinLearn&
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
如有投资本站或合作意向,请联系(010-);
邮箱:service@pinggu.org
投诉或不良信息处理:(010-)
京ICP证090565号
京公网安备号
论坛法律顾问:王进律师推荐这篇日记的豆列
······
&(388人关注)
&(138人关注)
&(1人关注)[转载]stata关于面板数据
stata关于面板数据
首先对面板数据进行声明:
前面是截面单元,后面是时间标识:
tsset company year
tsset industry year
产生新的变量:gen newvar=human*lnrd
产生滞后变量Gen fiscal(2)=L2.fiscal
产生差分变量Gen fiscal(D)=D.fiscal
描述性统计:xtdes
:对Panel Data截面个数、时间跨度的整体描述
Xtsum:分组内、组间和样本整体计算各个变量的基本统计量
xttab 采用列表的方式显示某个变量的分布
Stata中用于估计面板模型的主要命令:xtreg
xtreg depvar [varlist] [if exp] , model_type [level(#) ]
type&&&&&&&&&&&&&
be&&&&&&&&&&&&
Between-effects estimator
fe&&&&&&&&&&&&&
Fixed-effects estimator
re&&&&&&&&&&&&
GLS Random-effects estimator
pa&&&&&&&&&&
GEE population-averaged estimator
mle&&&&&&&
Maximum-likelihood Random-effects estimator
主要估计方法:
xtreg:&& Fixed-,
between- and random-effects, and population-averaged linear
xtregar:Fixed- and random-effects linear models with an AR(1)
disturbance
xtpcse :OLS or Prais-Winsten models with panel-corrected standard
xtrchh :Hildreth-Houck random coefficients models
xtivreg :Instrumental variables and two-stage least squares for
panel-data models
xtabond:Arellano-Bond linear,
dynamic panel data estimator
xttobit :Random-effects tobit models
xtlogit : Fixed-effects, random-effects, population-averaged logit
xtprobit :Random-effects and population-averaged probit
xtfrontier :Stochastic frontier models for panel-data
xtrc gdp invest culture edu sci health social admin,beta
xtreg命令的应用:声明面板数据类型:tsset&
描述性统计:xtsum gdp invest sci admin
1.固定效应模型估计:
xtreg& gdp invest culture sci health admin
固定效应模型中个体效应和随机干扰项的方差估计值(分别为sigma u 和sigma e),二者之间的相关关系(rho)
最后一行给出了检验固定效应是否显著的F 统计量和相应的P 值
2.随机效应模型估计:
xtreg& gdp invest culture sci health admin
检验随机效应模型是否优于混合OLS 模型:
在进行随机效应回归之后,使用xttest0
检验得到的P 值为0.0000,表明随机效应模型优于混合OLS 模型
3. 最大似然估计Ml:
xtreg& gdp invest culture sci health admin
techno,mle
Hausman检验Hausman检验究竟选择固定效应模型还是随机效应模型:
第一步:估计固定效应模型,存储结果
xtreg& gdp invest culture sci health admin
est store fe
第二步:估计随机效应模型,存储结果
xtreg& gdp invest culture sci health admin
est store re
第三步:进行hausman检验
hausman fe
Hausman检验量为:
H=(b-B)?[Var(b)-Var(B)]-1(b-B)~x2(k)
Hausman统计量服从自由度为k的χ2分布。当H大于一定显著水平的临界值时,我们就认为模型中存在固定效应,从而选用固定效应模型,否则选用随机效应模型
如果hausman检验值为负,说明的模型设定有问题,导致Hausman
检验的基本假设得不到满足,遗漏变量的问题,或者某些变量是非平稳等等
可以改用hausman检验的其他形式:
hausman fe, sigmaless
对于固定效应模型的异方差检验和序列相关检验:
Xtserial gdp invest culture sci health admin techno
异方差检验:
xtreg& gdp invest culture sci health admin
xttest3 (Modified Wald statistic for groupwise heteroskedasticity
in fixed effect model)
随机效应模型的序列相关检验:
xtreg& gdp invest culture sci health admin
Xttest1用于检验随机效应(单尾和双尾) 、一阶序列相关以及两者的联合显著
检验结果表明存在随机效应和序列相关,而且对随机效应和序列相关的联合检验也非常显著
可以使用广义线性模型xtgls对异方差和序列相关进行修正:
xtgls& gdp invest culture sci health admin
techno, panels(hetero),修正异方差
xtgls& gdp invest culture sci health admin
techno, panels(correlated),修正依横截面而变化的异方差
xtgls& gdp invest culture sci health admin
techno, panels(hetero) corr(ar1),修正异方差和一阶序列相关ar(1)
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 固定效应模型 的文章

 

随机推荐