Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

{Spam?}{Score: 0} RE: st: Re: ivreg etc.


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   {Spam?}{Score: 0} RE: st: Re: ivreg etc.
Date   Fri, 24 Mar 2006 11:04:29 -0000

Paolo,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Paolo Caruso
> Sent: 23 March 2006 21:56
> To: [email protected]; [email protected]
> Subject: Re: st: Re:
> 
> I have used the usual ivreg however, I am not sure about the 
> validity of doing so as it is including these interaction 
> terms in the first stage which are in fact the exactly value 
> of the instrumented variable simply multiplied by a dummy 
> variable. Therefore, because the interaction terms are based 
> on the variable I am instrumenting I believed that I would 
> have to estimate the two stages separately not including the 
> interaction terms.
> 
> If you believe that I should simply use ivreg then I shall.

The problem is not that ivreg isn't valid; it's the specification you
are providing to ivreg.  You need to make sure that you don't fall into
the "forbidden regression" trap - see my earlier posting and the
reference to Jeff Wooldridge's textbook.  I suggest following Austin's
suggestion and use ivreg (or ivreg2) with an extended set of
instruments.

Cheers,
Mark

> Thank you all for your time.
> 
> Regards,
> 
> Paolo
> 
> >>> [email protected] 03/23/06 18:44 PM >>>
> I agree that the -ivreg- approach is the best one.
> 
> (The omission of s in the first stage regression was an oversight).
> 
> Cheers,
> Arne
> 
> On 23/03/06, Austin Nichols <[email protected]> wrote:
> > The code Arne supplies is an example of how to get the answer 
> > requested by Paolo, but that answer is still incorrect.  
> Just run that 
> > code (including the variable s in both first and second 
> stages, since 
> > I think its omission was an oversight) to get:
> >
> > . qui use 
> http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear 
> > . qui regress iq med kww s expr tenure rns smsa . qui 
> predict double 
> > iq_hat . gen double intact = iq_hat*expr . qui regress lw iq_hat 
> > intact s expr tenure rns smsa . replace iq_hat = iq . qui replace 
> > intact = iq*expr . predict double res, residual . gen double res2 = 
> > res^2 . qui sum res2 . scalar iv_mse = r(mean)*r(N)/e(df_r) 
> . matrix b 
> > = e(b) . matrix V = e(V)*(iv_mse/e(rmse)^2) . ereturn post b V . 
> > ereturn display
> > 
> --------------------------------------------------------------
> ----------------
> >              |      Coef.   Std. Err.      z    P>|z|     
> [95% Conf. Interval]
> > 
> -------------+--------------------------------------------------------
> > -------------+--------
> >       iq_hat |   .0151927   .0061657     2.46   0.014     
> .0031081    .0272772
> >       intact |  -.0005875   .0008488    -0.69   0.489    
> -.0022512    .0010762
> >            s |   .0595681   .0188307     3.16   0.002     
> .0226605    .0964757
> >         expr |   .1018824   .0848968     1.20   0.230    
> -.0645121     .268277
> >       tenure |   .0295226   .0085698     3.44   0.001     
> .0127262     .046319
> >          rns |  -.0440594   .0349568    -1.26   0.208    
> -.1125736    .0244547
> >         smsa |   .1269817   .0301617     4.21   0.000     
> .0678657    .1860976
> >        _cons |   3.104997   .4183089     7.42   0.000     
> 2.285127    3.924868
> > 
> ----------------------------------------------------------------------
> > --------
> >
> > and then compare to the IV estimate:
> > . ivreg lw s expr tenure rns smsa (iq inta=kww med)
> > 
> --------------------------------------------------------------
> ----------------
> >           lw |      Coef.   Std. Err.      t    P>|t|     
> [95% Conf. Interval]
> > 
> -------------+--------------------------------------------------------
> > -------------+--------
> >           iq |   .1019604   .7498967     0.14   0.892    
> -1.370186    1.574107
> >       intact |   -.031272   .2663122    -0.12   0.907     
> -.554078    .4915341
> >            s |  -.0457328   .9088715    -0.05   0.960    
> -1.829968    1.738502
> >         expr |    3.17964   26.70891     0.12   0.905    
> -49.25347    55.61275
> >       tenure |   .0273913   .0324433     0.84   0.399    
> -.0362991    .0910818
> >          rns |  -.0274002   .1739247    -0.16   0.875    
> -.3688374     .314037
> >         smsa |  -.0344371   1.379771    -0.02   0.980    
> -2.743109    2.674235
> >        _cons |  -4.338579     64.363    -0.07   0.946    
> -130.6916    122.0145
> > 
> ----------------------------------------------------------------------
> > --------
> >
> > Note particularly the SEs and p-values on the two endog vars.
> >
> > I believe this impulse to "plug in" y2hat in various incorrect ways 
> > comes from conceiving of the IV estimator as a two-step estimator, 
> > which it is not.  The better two-step estimator analogy uses the 
> > control function approach, IMHO, since folks are less 
> likely to apply 
> > it incorrectly in a nonlinear second stage, or to square or 
> interact 
> > y2hat.
> >
> > Arne, do you concur?
> >
> > On 3/23/06, Arne Risa Hole <[email protected]> wrote:
> > > I suppose an alternative approach would be to do 
> something like this:
> > >
> > > use 
> http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear qui 
> > > regress iq med kww expr tenure rns smsa predict double iq_hat gen 
> > > double intact = iq_hat*expr qui regress lw iq_hat intact s expr 
> > > tenure rns smsa replace iq_hat = iq replace intact = 
> iq*expr predict 
> > > double res, residual gen double res2 = res^2 qui sum res2 scalar 
> > > iv_mse = r(mean)*r(N)/e(df_r) matrix b = e(b) matrix V = 
> > > e(V)*(iv_mse/e(rmse)^2) ereturn post b V ereturn display
> > >
> > > i.e. get the forecast y2hat (iq_hat in the example) from the 
> > > first-stage regression and interact this with the 
> exogenous RHS var 
> > > x1 (expr in the example). Then you replace the interaction with 
> > > y2*x1 before calculating the residuals/MSE.
> > >
> > > Austin's suggestion is probably the better one though, but this 
> > > seems to me to be ok.
> > >
> > > Cheers
> > > Arne
> > >
> > > On 23/03/06, Austin Nichols <[email protected]> wrote:
> > > > If your endog RHS var y2 is interacted with an exog RHS var x1, 
> > > > then you have a "new" endog RHS var y2x1, and you may need 
> > > > additional excluded instruments.  Use -ivreg- as suggested.
> >
> > *
> > *   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/
> >
> 
> *
> *   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/
> 
> 
> *
> *   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/
> 
> 

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index