Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: re: xtivreg2 - Incomplete computation of first stage regression
From
"Schaffer, Mark E" <[email protected]>
To
<[email protected]>
Subject
st: RE: re: xtivreg2 - Incomplete computation of first stage regression
Date
Sun, 28 Feb 2010 15:37:51 -0000
Kit et al.,
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Kit Baum
> Sent: 28 February 2010 15:18
> To: [email protected]
> Subject: st: re: xtivreg2 - Incomplete computation of first
> stage regression
>
> <>
> I expect that Mark Schaffer will chime in on this soon if he
> is online; I have brought it to his attention. It is a
> problem with Mark's -xtivreg2- (SSC), which is a 'wrapper'
> for our -ivreg2- (SSC). Although the xtivreg2 call in this
> example does not work for the lagged endogenous variable, the
> same call to -ivreg2- does:
>
> webuse grunfeld, clear
> // xtivreg2 invest (mvalue L.kstock = L.mvalue time), fe first
>
> ivreg2 invest (mvalue L.kstock = L.mvalue time), first
>
> suggesting that something is getting lost in the 'wrapper'
> logic. An (admittedly inelegant) solution for the time being
> would be to just create the variable lkstock = L.kstock which
> should then work fine.
Yes, I can confirm this is a bug in xtivreg2 which I will add to my
to-fix list.
In the meantime, Kit's solution is the right way to go
Original example:
xtivreg2 lsalary ceodual ... (ownexr ownex2r ownex3r L.ldiv L.debt =
lrisk lsale lsale2......), fe cluster(id) small first
Fix:
gen Lldiv=L.ldiv
gen Ldebt=L.debt
xtivreg2 lsalary ceodual ... (ownexr ownex2r ownex3r Lldiv Ldebt = lrisk
lsale lsale2......), fe cluster(id) small first
For those who are curious, the problem is the following. xtivreg2
transforms all variables as needed before calling ivreg2. This means
the within-transformation (for the FE estimator), time series operators,
etc. After ivreg2 returns its results to xtivreg2, xtivreg2 replaces
all temporary variable names in the saved results with the actual
variable names. Or, at least, it should - the bug is that it doesn't do
this for saved first-stage regression results.
Cheers,
Mark
> I agree that the code should gracefully handle this issue, no
> matter what is asked, but from an econometric standpoint, why
> would a lagged variable be correlated with the time-t error
> term? If there is some evidence (e.g., via a C-test with
> endog()) that this variable must be considered endogenous, I
> would suspect that the specification of the equation is
> faulty, as the computation of that Durbin-Wu-Hausman test has
> as its maintained hypothesis that the specification is correct.
>
> Kit
>
> Kit Baum | Boston College Economics & DIW Berlin |
> http://ideas.repec.org/e/pba1.html
> An Introduction to Stata
> Programming | http://www.stata-press.com/books/isp.html
> An Introduction to Modern Econometrics Using Stata |
> http://www.stata-press.com/books/imeus.html
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/