来源:计量经济学服务中心综合整理 转载请注明来源 面板数据是非常常见的数据类型,尤其是在经济、金融的研究中,面板数据、时间序列数据的相关模型,得到了极大地发展和广泛的应用。推荐阅读:面板数据(Panel Data)汇总 面板数据,简言之是时间序列和截面数据的混合。严格地讲是指对一组个体(如居民、国家、公司等)连续观察多期得到的资料。所以很多时候我们也称其为“追踪资料”。近年来,由于面板数据资料获得变得相对容易,使得其应用范围也不断扩大。采用面板数据模型进行分析的主要目的在于两个方向:一是控制不可观测的个体异质性,包含两个方面:一是由于民族习惯、风俗文化而形成的、不随着时间移动而改变的个体效应。二是在特定年份而出现的时间效应;二是描述和分析动态调整过程,处理误差成分。使模型包含的信息量更大,降低了变量间共线性的可能性,增加了自由度和估计的有效性。 面板数据,即Panel Data,是截面数据与时间序列综合起来的一种数据资源。 在分析时,多用PanelData模型,故也被称为面板数据模型。 它可以用于分析各样本在时间序列上组成的数据的特征,它能够综合利用样本信息,通过模型中的参数,既可以分析个体之间的差异情况,又可以描述个体的动态变化特征。 面板数据基本上可以认为是同一个截面的观测样本在不同时间节点的重复测量和记录;或者同样也可以认为是若干个结构、记录时间、记录选项相同的时间序列数据的复合结构。因此,在针对面板数据进行分析时候,通常可以使用截面数据的一些方法,同样也可以使用时间序列的一些方法。方法之间的共通性在这一“混合”类型的数据中体现的还是十分明显的。 以下都是常用面板命令,不作详细解释。 xtset Declare a dataset to be panel data xtdescribe Describe pattern of xt data xtsum Summarize xt data xttab Tabulate xt data xtdata Faster specification searches with xt data xtline Line plots with xt data xtreg Fixed-, between- and random-effects, and population-averaged linear models xtregar Fixed- and random-effects linear models with an AR(1) disturbance xtmixed Multilevel mixed-effects linear regression xtgls Panel-data models using GLS xtpcse OLS or Prais-Winsten models with panel-corrected standard errors xthtaylor Hausman-Taylor estimator for error-components models xtfrontier Stochastic frontier models for panel data xtrc Random coefficients models xtivreg Instrumental variables and two-stage least squares for panel-data models xtunitroot Panel-data unit-root tests xtabond Arellano-Bond linear dynamic panel-data estimator xtdpdsys Arellano-Bond/Blundell-Bond estimation xtdpd Linear dynamic panel-data estimation xttobit Random-effects tobit models xtintreg Random-effects interval-data regression models xtlogit Fixed-effects, random-effects, & population-averaged logit models xtprobit Random-effects and population-averaged probit models xtcloglog Random-effects and population-averaged cloglog models xtpoisson Fixed-effects, random-effects, & population-averaged Poisson models xtnbreg Fixed-effects, random-effects, & population-averaged negative binomial models xtmelogit Multilevel mixed-effects logistic regression xtmepoisson Multilevel mixed-effects Poisson regression xtgee Population-averaged panel-data models using GEE 模型设定过程中最为关键同时也是最难的一步,在这方面功力的提高还需要大量的实践经验和对理论的深入理解。 1)检验个体效应的显著性。我们做固定效应模型时,F检验表明固定效应模型由于混合OLS模型。下面我们说明如何检验随机效应是否显著,命令为:xttest0。若P 值为0.0000,表明随机效应非常显著。 2)Hausman检验。具体步骤为: step1:估计固定效应模型,存储估计结果; step2:估计随机效应模型,存储估计结果; step3:进行Hausman检验; 命令为: xtreg GDP FDI EX IM, fe /*step1*/ eststore fe xtreg GDP FDI EX IM, re /*step2*/ eststore re hausman fe re/*step3*/ eststore 的作用在于把估计结果存储到名称为fe,re的临时性文件中。然后我们就可以根据Hausman检验的值进行模型的选择了。注意Hausman检验需要将fe放在re前面。 对于面板数据,如果观测到被解释变量随时间而改变,则开启了动态面板对参数估计的可能性。动态面板模型设定了一个个体的被解释变量部分取决于前一期的值。当被解释变量的滞后一期或者多期出现在解释变量中。 对于短面板数据来说,需要研究短面板的固定效应模型估计,使用一阶差分消除固定效应。通过解释变量的适当滞后期作为工具变量对一阶差分模型中的参数进行IV估计可以得到一致估计量。但是Stata有一些固定的命令,可以直接进行动态面板估计。如:xtabond、xtdpdsys、xtdpd。以上这些命令使得模型更加容易估计,同时也提供了相关的一些检验。 |
|
来自: lyricLee7v7c1q > 《stata》