当前位置:文档之家› stata上机实验第五讲——面板数据的处理..教学内容

stata上机实验第五讲——面板数据的处理..教学内容


mvalue
4833 4924.9 6241.7 5593.6 2289.5 2159.4 2031.3 2115.5 1819.4 2079.7 2371.6 2759.9
面板数据模型
• 考虑如下模型:

Yit=Xitb+Uit

uit=ai+εit
其中, i=1,2,… N ; t=1, 2,…T(既有i又有t的 情况则一般是用面板数据)
• xtgls Panel-data models using GLS
• xtpcse OLS or Prais-Winsten models with panelcorrected standard errors
• xtrchh Hildreth-Houck random coefficients models
• xtgls
Panel-data models using GLS
• xtpcse OLS or Prais-Winsten models with panelcorrected standard errors
面板向量自回归模型(Panel VAR) 面板单位根检验(Panel Unit Root test) 面板协整分析(Panel Cointegeration) 门槛面板数据模型(Panel Threshold) 面板联立方程组 面板空间计量
静态面板数据
• 静态面板数据模型,是指解释变量中不包 含被解释变量的滞后项(通常为一阶滞后项) 的情形。但严格地讲,随机干扰项服从某 种序列相关的模型,如AR(1), AR(2), MA(1) 等,也不是静态模型。静态面板数据主要 有两种模型------固定效应模型和随机效应 模型。
• xtreg
ed-, between- and random-effects, and
population-averaged linear models
• xtregar Fixed- and random-effects linear models with an AR(1) disturbance
xtdes。分组内、组间和样本整体计算各个变量的 基本统计量xtsum。采用列表的方式显示某个变 量的分布xttab,较少使用。 • 3、list、sum、des、tabstat、histogram、 kdensity等命令都可以用。 • 4、对每个个体分别显示该变量的时间序列图: xtline。 • 5、静态面板数据基本回归命令:xtreg,系统默 认GLS估计(广义最小二乘法)。
• xtivreg Instrumental variables and two-stage least squares for panel-data models
• xtabond Arellano-Bond linear, dynamic panel data estimator (动态面板估计)
use grunfeld,clear
xtset company year
xtdes
xtline invest 混合回归:reg invest mvalue kstock(pool回归,
其会扩大样本量,) 固定效应:xtreg invest mvalue kstock ,fe 随机效应:xtreg invest mvalue kstock ,re 用F值或P值进行判断,如果p值较大,则应该用
• xtabond2 Arellano-Bond system dynamic panel data estimator(需要从网上下载)
• xttobit Random-effects tobit models
• xtintreg Random-effects interval data regression models
具有相同的截距项,个体的差异主要反应
在随机干扰项的设定上。
• 怎样选择固定效应和随机效应?
• 随机效严格要求个体效应与解释变量不相 关,即
• Cov(ai,XitB)=0 • 而固定效应模型并不需要这个假设条件。 • 这是两种模型选择的关键。
面板数据基本命令
• 1、指定个体截面变量和时间变量:xtset( • 2、对数据截面个数、时间跨度的整体描述:
固定效应模型
• 固定效应模型的公式变为:

Yit=ai+Xitb+εit
• 回归结果是每个个体都有一个特定的截距
项。(ai在这里就独立出来了)
随机效应模型
• 随机效应模型将个体效应ai视为随机因素, 即把个体效应设定为干扰项的一部分。公
式将变为:

Yit=Xitb+(ai+εit)
• 回归的结果是随机效应模型的所有的个体
company
1 1 1 1 2 2 2 2 3 3 3 3
面板数据的格式
year
1951 1952 1953 1954 1951 1952 1953 1954 1951 1952 1953 1954
invest
755.9 891.2 1304.4 1486.7 588.2 645.5 641 459.3 135.2 157.3 179.5 189.6
面板数据
一些面板数据教材
• 面板数据分析 (美)萧政 著 • 横截面与面板数据的经济计量分析 伍德里
奇 著,王忠玉 译 • Baltagi. Econometric Analysis of Panel
Data
• 最新动态可关注期刊: Journal of Econometrics
面板数据一些前沿问题
pool回归)
• xtreg Fixed-, between- and random-effects, and population-averaged linear models
• xtregar Fixed- and random-effects linear models with an AR(1) disturbance
uit称为复合扰动项。
固定效应模型
• 对于特定的个体i而言,ai 表示那些不随时 间改变的影响因素,如个人的消费习惯、 国家的社会制度、地区的特征、性别等, 一般称其为“个体效应” (individual effects)。如果把“个体效应”当作不随时 间改变的固定性因素, 相应的模型称为 “固定效应”模型。
相关主题