Statalist The Stata Listserver


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

Re: st: Re:


From   "Arne Risa Hole" <arnehole@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re:
Date   Thu, 23 Mar 2006 17:31:23 +0000

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 <austinnichols@gmail.com> 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.
>
> On 3/23/06, Paolo Caruso <P.Caruso@warwick.ac.uk> wrote:
> > Thanks for your replies.
> >
> > The reason why I want to exclude the variables is because they are interactions (based on the variable that I am instrumenting) therefore, it can not be valid to include them in the first stage. If there is any other way of avoiding this problem then please let me know.
> >
> > Thank you for the commands but the actual problem I am having is if it is possible to do the same thing apart from with more than one instrumented variable and what additional commands I would have to do in order to ensure the correct t-stats are reported.
> >
> > Regards,
> >
> > Paolo
> >
> > >>> austinnichols@gmail.com 03/23/06 14:08 PM >>>
> > It is worse than "not a good idea" to pick and choose among exog vars
> > to include in the first stage--it is not the IV estimator, and you
> > would have to derive consistency results for your new homemade
> > estimator based on different assumptions. You are better off sticking
> > with -ivreg- or -ivreg2- to be sure. If you want to include
> > d7usq=d7unit^2 as a new endogenous RHS variable, you now have two
> > endog variables, and you may need more excluded instruments--but the
> > products (with exog vars) and powers of your existing excluded
> > instrument(s) are candidates.
> >
> > On 3/23/06, Arne Risa Hole <arnehole@gmail.com> wrote:
> > > You can try the following code:
> > <snip> This replicates:
> > >
> > > ivreg lw expr tenure rns smsa (iq s=med kww)
> > >
> > > If you want to remove some of the instruments simply drop them from
> > > the first stage regressions. Note that not using all the exogenous
> > > variables as instruments is probably not a good idea - see
> > > http://www.stata.com/support/faqs/stat/ivreg.html.
> > >
> > > On 23/03/06, Paolo Caruso <P.Caruso@warwick.ac.uk> wrote:
> > > > This is a question with regards to IV's.
> > > >
> > > > I am using STATA in order to do a 2SLS. STATA does not allow you to specify which variables to include or not include in the first stage. This means that I have to complete the regression in the separate two stages.
> > > >
> > > > I know how to adjust the MSE when I have one variable that I want to instrument, however, I do not know how to do it when I have more than one.
> > > >
> > > > The command lines in stata to adjust the MSE for one variable are as follows:
> > > <snip> ereturn display
> > > >
> > > > where d7unit is the variable that I want to instrument and loginc is the dependant variable.
> > > >
> > > > I would also like to instrument d7unit^2 and this is where I am unsure what the relevant command lines would be in order to ensure that the correct MSE is used.
> > > >
> > > > Any help would be much appreciated.
> >
> > *
> > *   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–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index