尽管这个问题不止一个人问过,但是搜遍各家网站也没有满意的答案,有些不懂装懂的B只告诉你看手册,可是手册中也没有比较这两个命令的区别,下面我翻译一下stata 中有关回答和手册解释:
1.stata官网中的回答
Re: st: Some questions about ivreg2 xtivreg xtivreg2
From "Austin Nichols" <austinnichols@gmail.com>
To statalist@hsphsun2.harvard.edu
Subject Re: st: Some questions about ivreg2 xtivreg xtivreg2
Date Tue, 13 Nov 2007 14:24:59 -0500
Roma <fr1975@katamail.com>:
The difference between ivreg2 and xtivreg2 is more or less the same as
the difference between reg and xtreg; see the [XT] xtreg manual entry.
In short, if
yit = Xit b + Wi c + uit
then
yi(t-1) = Xi(t-1) b + Wi c + ui(t-1)
and
yit - yi(t-1) = Xit b - Xi(t-1) b + uit - ui(t-1)
which is estimated via the -fd- option on -xtivreg2-.
Also if
yit = Xit b + Wi c + uit
then
Es(yis) = Es(Xis) b + Wi c + Es(uis)
where Es is the mean over all t, and
yit - Es(yis) = Xit b - Es(Xis) b + uit - Es(uis)
which is estimated via the -fe- option on -xtivreg2-.
Note this applies even if you don't observe Wi and can't estimate c,
so by using -xtivreg2- you may eliminate another source of bias.
-xtivreg2- is a program that transforms the data appropriately, then
calls -ivreg2- to do the estimation. Hence a "wrapper" for -ivreg2-.
On 11/13/07, fr1975@katamail.com <fr1975@katamail.com> wrote:
> * ivreg2 y1 x1 x2 (x3 = x4 x5 x6), first bw(2) gmm2s kernel(tru)
>
> Then, I was suggested to compute the same equation by "xtivreg2", getting very different result (and the insignificance of one instrument)!
> I know that as estimation methods differ you have something of a check on whether models are stable, efficient and so on, but I really don't understand why and how it would be better estimating the equation above by xtivreg2 (or xtvreg).
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
翻译:
Re:st:关于ivreg2 xtivreg xtivreg2的一些问题
从“奥斯汀尼科尔斯”<austinnichols@gmail.com>
到statalist@hsphsun2.harvard.edu
主题Re:st:关于ivreg2 xtivreg xtivreg2的一些问题
Date Tue,13 Nov 2007 14:24:59 -0500
Roma <fr1975@katamail.com>:
ivreg2和xtivreg2之间的差异或多或少相同
reg和xtreg之间的差异;请参见[XT] xtreg手动输入。
总之,如果
yit = Xit b + Wi c + uit
然后
yi(t-1)= Xi(t-1)b + Wi c + ui(t-1)
和
yit-yi(t-1)= Xit b-Xi(t-1)b +
这通过-fd-选项在-xtivreg2-上估计。
也是如果
yit = Xit b + Wi c + uit
然后
Es(yis)= Es(Xis)b + Wi c + Es(uis)
其中Es是所有t的平均值,
yit-Es(yis)= Xit b-Es(Xis)b + uit-Es(uis)
这通过-fe-选项在-xtivreg2-上估计。
注意这适用,即使你不遵守Wi并且不能估计c,所以你可以通过使用-xtivreg2-消除另一个偏见的来源。
-xtivreg2-是一个适当地调用-ivreg2-转换数据的程序来做估计。因此,被称为-ivreg2-的“包装器”。
在11/13/07,fr1975@katamail.com <fr1975@katamail.com>写道:
> * ivreg2 y1 x1 x2(x3 = x4 x5 x6),first bw(2)gmm2s kernel(tru)
>然后,我建议通过“xtivreg2”计算相同的方程,得到非常不同的结果(和一个仪器的无意义)!
>我知道,作为估计方法不同,你有一些模型设计更为稳定,高效等等,但我真的不明白为什么和如何更好地估计上面的方程xtivreg2(或xtvreg)。
*:
*搜索和帮助尝试:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
2.ivreg2手册翻译
ivreg2为线性回归模型实现了一系列单方程估计方法:OLS,工具变量(IV,也称为两阶段最小二乘法,2SLS),广义矩(GMM)方法,有限信息最大似然 LIML)和k类估计量。 在IV / GMM的语言中,varlist1是外生回归或“包含的工具”,varlist_iv是从回归或“排除的工具”中排除的外生变量,varlist2是正被“检测”的内源回归。
ivreg2还将使用鲁棒(异方差一致),自相关一致(AC),异方差和自相关一致(HAC)和聚类鲁棒方差估计来估计线性回归模型。
ivreg2是Stata官方ivregress的替代品。其特点包括:两步可行GMM估计(gmm2s选项)和连续更新的GMM估计(提示选项); LIML和k类估计;过度识别和欠认定检验统计自动输出;工具子集异质性的C统计检验(orthog()选项);内生回归的内生性测试(endog()选项);仪器冗余测试(冗余()选项);用户指定的内核(内核()选项)选择基于内核的自相关一致性(AC)和异方差和自相关一致性(HAC)标准误差和协方差估计(bw两级簇鲁棒标准误差和统计;默认报告大样本统计(z和卡方而不是t和F);小选项报告小样本统计;第一阶段回归报告有各种测试和统计鉴定和仪器相关性; ffirst选项只报告这些识别统计信息,而不是第一阶段回归结果本身。 ivreg2也可以用于使用与官方回归和newey相同的命令语法的普通最小平方(OLS)估计。
ivreg2报告的标准误差和测试统计可以使得与i.i.d假设的各种违反一致。 错误。 当这些选项与gmm2s或cue选项(见下文)组合时,所报告的参数估计器在存在相同违反i.i.d的情况下也是高效的。
3,xtivreg2手册翻译
xtivreg2实现了具有可能的内源性回归的固定效应和一阶差分面板数据模型的IV / GMM估计。 它本质上是ivreg2的包装器,必须安装xtivreg2才能运行(Stata 9需要ivreg2版本2.1.11或更高版本; Stata 8.2需要ivreg28)。 xtivreg2支持ivreg2的所有估计和报告选项; 有关完整的描述和示例,请参阅帮助ivreg2。 特别地,xtivreg2还支持ivreg2(异方差,簇和自相关 - 鲁棒协方差矩阵和标准误差,过度识别和正交性测试,第一阶段和弱/不足识别统计等)提供的所有统计数据,并将报告 具有面板数据估计所需的任何自由度调整。
这里关键问题是:“包装器”怎么理解?是否可以理解为ivreg2可以做的,xtivreg2也可以做,反之则不行。
xtivreg2不能用于有虚拟变量的方程估计,因为差分掉了?是这样吗?
但是ivreg2却可以,因为不需要差分,或者说不能差分,因为ivreg2允许有时间效应(即适用于混合面板),而xtivreg2只能做固定效应,所以也不能研究具有虚拟变量的问题,是这样吗?
因此又演化出xtbond等可以做时间效应的面板工具命令,是这样吗?
我估计这一个问题就筛掉一大批伪博士。


雷达卡







京公网安备 11010802022788号







