文档介绍:STATA与面板数据回归1
面板数据模型的误差项由两部分组成:
一部分是与个体观察单位有关的,它概括了所有影响被解释变量,但不随时间变化的因素,因此,面板数据模型也常常被成为非观测效应模型;
另外一部分概括了随截面随时间而变化的不可观Durbin-Watson 统计量:estat dwatson
序列相关检验:estat durbinalt
滞后阶数选择:estat durbinalt,lags(2)
条件异方差检验:estat archlm,lags(2)
可选变量的异方差检验:estat szroeter gdp invest culture sci
五、Stata对面板数据模型的估计
随机效应模型
Stata对面板数据模型的估计
首先对面板数据进行声明:
前面是截面单元,后面是时间标识:
tsset company year
tsset industry year
产生新的变量:gen newvar=human*lnrd
产生滞后变量Gen fiscal(2)=
产生差分变量Gen fiscal(D)=
描述性统计:
xtdes :对Panel Data截面个数、时间跨度的整体描述
Xtsum:分组内、组间和样本整体计算各个变量的基本统计量
xttab 采用列表的方式显示某个变量的分布
Stata中用于估计面板模型的主要命令:xtreg
xtreg depvar [varlist] [if exp] , model_type [level(#) ]
Model 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 errors
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 models
xtprobit :Random-effects and population-averaged probit models
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
:
xtreg gdp invest culture sci health admin techno,fe
固定效应模型中个体效应和随机干扰项的方差估计值(分别为sigma u 和sigma e),二者之间的相关关系(rho)
最后一行给出了检验固定效应是否显著的F 统计量和相应的P 值,本例中固定效应非常显著
:
xtreg gdp invest culture sci health admin tech