一、loghex关于loggdp的误差修正:
stata语言: xtreg d.loghex l.loghex l.loggdp ld.loghex l(-1/1).d.loggdp year if ctr < 6, fe
解释:
1、 xtreg为对面板数据的估计,stata中的用法和解释如下: 用法: GLS random-effects (RE) model
xtreg depvar [indepvars] [if] [in] [, re RE_options]
Between-effects (BE) model xtreg depvar [indepvars] [if] [in] , be [BE_options]
Fixed-effects (FE) model xtreg depvar [indepvars] [if] [in] [weight] , fe [FE_options] #固定效应模型
ML random-effects (MLE) model xtreg depvar [indepvars] [if] [in] [weight] , mle [MLE_options]
Population-averaged (PA) model xtreg depvar [indepvars] [if] [in] [weight] , pa [PA_options]
xtreg fits cross-sectional time-series regression models. In particular,
xtreg with the be option fits random-effects models by using the between regression estimator; with the fe option, it fits fixed-effects models (by using the within regression estimator); and with the re option, it fits random-effects models by using the GLS estimator (producing a matrix-weighted average of the between and within results). See [XT] xtdata for a faster way to fit fixed- and random-effects models. (?1有待解决的问题:xtdata与xtreg的区别)
2、l.loggdp d.loghex l.d.loggdp l(-1/1).d.loggdp什么意思?
人大经济论坛:
L(0/1).w l(0/2) 中的(0/1).和(0/2)到底指得是什么意思啊?
L#.x 代表:X的#阶滞后, 如L 3. x 就代表x的三阶滞后; 同样:
F#.X 代表X的# 阶超前;
D#.X代表X的#次差分;
S#.X代表X的#阶季节差分。
(0/1) 表示 数1、2
更一般的,#/* 代表从数#到数*,例3/10代表 3、4、5、6、7、8、9、10。
所以 l(0/1).w 代表:工资w的0阶滞后和w的1阶滞后。
另外:如果是X的1阶滞后 则可以简写为 L.X ;
(?2:(-1/1)代表-1、0、1,有滞后-1项的吗?)
3、crt是定义的面板数据截面变量,year是时间变量
二、面板数据的输入:
在stata的数据文件中设置多设置两个变量,分别用来表示时间变量和截面变量,而在具体运行估计时,需要你设置相应的截面变量或时间变量 Stata软件关于面板数据的使用基本上是这样的:将各截面数据中同一变量列为一个变量如投资,加入一个主体变量用以识别不同主体,同时还可加入时间变量,具体使用可参阅stata中关于xt的帮助。
三、关于固定效应还是随机效应模型:
不论是固定效应还是随机效应,都是随机的,都概括了那些没有观测到的、不遂时间变化的、但是被影响解释变量的因素。非观测效应究竟是应假设为固定效应还是随机效应,关键看这部分不随时间变化的非观测效应对应的因素是否与模型中控制的解释变量相关,如果不相关,则这个效应应为随机效应。
非观测效应模型(即面板模型)因为对非观测效应的假设不同,使用面板数据的信息不同,可以用不同的方法来估计并且得到不同的估计量,一般有四个:
(1)组内估计量(within estimator)
(2)组间估计量(between estimator)
(3)混合OLS估计量(pooled OLS esrimator)
(4)随机效应估计量(RE、GLS或FGLS估计量)
|
|