Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: RE: RE: xtivreg, xtiveg2 and time invariant excluded instruments

 From "sdm1" To Subject st: RE: RE: xtivreg, xtiveg2 and time invariant excluded instruments Date Tue, 28 Sep 2010 17:43:36 +0100

Mark,

Thanks for pointing out the problem with time invariant instruments in a
panel FE model.

>>What happens if you reestimate using xtivreg and omit lneedHPandG by
>>Hand.  Do you get the same results as reported below?

No, because now xtivreg automatically drops the endogenous regressor (see
below).

xtivreg  lallcancersdsmr yr78dv yr89dv (lg2_expphHPandG=llonepenhx
lpoppucarx), fe

Fixed-effects (within) IV regression         Number of obs      =
456
Group variable: pct_codenum                  Number of groups   =
152

R-sq:  within  = 0.2390                      Obs per group: min =
3
between =      .                                     avg =
3.0
overall = 0.0075                                     max =
3

Wald chi2(2)       =
1.85e+07
corr(u_i, Xb)  = -0.0000                     Prob > chi2        =
0.0000

----------------------------------------------------------------------------
--
lallcance~mr |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
lg2_expphH~G |  (omitted)
yr78dv |  -.0141391   .0027198    -5.20   0.000    -.0194698
-.0088084
yr89dv |  -.0264635   .0027198    -9.73   0.000    -.0317942
-.0211328
_cons |   4.786809   .0019232  2489.00   0.000     4.783039
4.790578
-------------+--------------------------------------------------------------
--
sigma_u |  .12299815
sigma_e |   .0237106
rho |  .96417042   (fraction of variance due to u_i)
----------------------------------------------------------------------------
--
F  test that all u_i=0:     F(151,302) =    62.74         Prob > F    =
0.0000
----------------------------------------------------------------------------
--
Instrumented:   lg2_expphHPandG
Instruments:    yr78dv yr89dv llonepenhx lpoppucarx
----------------------------------------------------------------------------
--

Steve

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Schaffer, Mark E
Sent: 27 September 2010 23:37
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: xtivreg, xtiveg2 and time invariant excluded instruments

Steve,

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of sdm1
> Sent: 25 September 2010 16:55
> To: statalist@hsphsun2.harvard.edu
> Subject: st: xtivreg, xtiveg2 and time invariant excluded instruments
>
> I'm trying to estimate a panel fixed effects model (152
> individuals observed annually over a 3 year period).  As
> you'll see from the Stata 11 SE output below, xtivreg
> produces some estimates but xtivreg2 seems to think that
> there are too few instruments.  I am puzzled by this and why
> xtivreg drops the exogenous regressor lneedHPandG from the
> model.  Are either of these 'puzzles' related to the fact
> that both excluded instruments (llonepenhx
> lpoppucarx) are time invariant?

I think the answer to your question is "yes", but it still leaves me
puzzled.

Time-invariant variables turn into vectors of zeros after the
within-transformation, and drop out of the estimation.  That's why
-xtivreg2- complains that the model is not identified.

What puzzles me is that xtivreg drops the variable lneedHPandG instead

What happens if you reestimate using xtivreg and omit lneedHPandG by
hand, e.g.,

xtivreg  lallcancersdsmr yr78dv yr89dv (lg2_expphHPandG=llonepenhx
lpoppucarx), fe

Do you get the same results as reported below?

--Mark

>
> Thanks.
>
> Steve
>
> . xtivreg  lallcancersdsmr lneedHPandG yr78dv yr89dv
> (lg2_expphHPandG=llonepenhx lpoppucarx), fe
>
> Fixed-effects (within) IV regression         Number of obs      =
> 456
> Group variable: pct_codenum                  Number of groups   =
> 152
>
> R-sq:  within  =      .                      Obs per group: min =
> 3
>        between = 0.2229                                     avg =
> 3.0
>        overall = 0.1503                                     max =
> 3
>
>                                              Wald chi2(3)       =
> 6.14e+06
> corr(u_i, Xb)  = -0.6050                     Prob > chi2        =
> 0.0000
>
> --------------------------------------------------------------
> --------------
> --
> lallcancer~r |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
> -------------+------------------------------------------------
> ----------
> -------------+----
> --
> lg2_expphH~G |  -.2661569   .1438617    -1.85   0.064    -.5481207
> .0158069
>  lneedHPandG |  (omitted)
>       yr78dv |   .0135551   .0156954     0.86   0.388    -.0172073
> .0443176
>       yr89dv |   .0165872   .0237433     0.70   0.485    -.0299488
> .0631232
>        _cons |   4.116574   .3622872    11.36   0.000     3.406504
> 4.826644
> -------------+------------------------------------------------
> ----------
> -------------+----
> --
>      sigma_u |  .15213838
>      sigma_e |  .04114184
>          rho |  .93185438   (fraction of variance due to u_i)
> --------------------------------------------------------------
> --------------
> --
> F  test that all u_i=0:     F(151,301) =     9.87
> Prob > F    =
> 0.0000
> --------------------------------------------------------------
> --------------
> --
> Instrumented:   lg2_expphHPandG
> Instruments:    lneedHPandG yr78dv yr89dv llonepenhx lpoppucarx
> --------------------------------------------------------------
> --------------
> --
>
> . xtivreg2 lallcancersdsmr lneedHPandG yr78dv yr89dv
> (lg2_expphHPandG=llonepenhx lpoppucarx), fe equation not
> identified; must have at least as many instruments not in the
> regression as there are instrumented variables
>
> *
> *   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/

*
*   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/