Prof. Mark E. Schaffer,
Again, I appreciate your assistance. I'm sorry if my prior submission
The fitted values, fittedt1 & fittedt2, are obtained from the
regression of the endogenous regressor on the included and excluded
variables. To obtain these estimates I use,
xtreg y1 x1 x2 z1 z2, fe
The predicted values from this regression are then interacted with the
year dummy variables to obtain the variables fittedt1 and fittedt2. A
similar interaction is done for the y1 variables to obtain y1_t1
These values are used in the instrumental variable estimation.
ivreg2 y x1 x2 (y1_t1 y1_t2 = fittedt1 fittedt2)
>Date sent: Wed, 24 Nov 2004 10:31:59 -0500
>From: "Gregory Dybalski" <DybalskiG@gao.gov>
>Subject: st: Is there a way to use ivreg2 without running the
>Send reply to: firstname.lastname@example.org
>> Prof. Mark E. Schaffer,
>> I appreciate your reply, it was quite helpful. Your method should
>> I have an similar alternative method that I would like you to
>> on. I referred to the archaic '2SLS' method because I am switching
>> Limdep (ver 8), which, in fact, forces the user to perform IV
>> in two steps. I originally estimated the model in Limdep because it
>> a procedure to estimate a fixed effects model using IV that corrects
>> autocorrelation. Your recent changes to the ivreg2 procedure now
>> provide for such estimation.
>> You correctly stated the basic model that I want to estimate using
>> ivreg2 y x1 x2 (y1=z1 z2)
>> I have 17 years of data for each group and want to examine if the
>> coefficient for the y1 variable is different for earlier years than
>> later years. To estimate this revised model in Limdep I created 4
>> variables: y1_t1 & y1_t2 (the interaction between y1 and the dummy
>> variable for the time periods) and fittedt1 & fittedt2 (the
>> between the estimated 1st stage values and the dummy variable for
>> time periods). I used Limdep regression command with 2 endogenous
>> regressors and their fitted values.
>> To estimate this model in Stata you suggested that I create
>> variables by interacting the y1 and the excluded instruments with a
>> dummy variable. Your method interacts the excluded instruments with
>> dummy variable but does not interact the included exogenous
>> x1 & x2, with the dummy. Your method & mine will not result in the
>> estimated values, but I am not sure that it matters.
>It's entirely up to you. If you think that the coefficients on x1
>and x2 may also have changed, then you can also interact these with
>the time dummy, then test etc. Or if you want to maintain the
>assumed constancy of these coefficients, then don't interact.
>> Proposed Alternative Method
>> I have an alternative method that I would like you to comment on.
>> happens if I substitute the '1st stage' fitted values for the
>> exogenous variables in the ivreg2 command instead of the z1 and z2
>> variables? The ivreg2 command would then become,
>> ivreg2 y x1 x2 (y1_t1 y1_t2 = fittedt1 fittedt2)
>I don't understand what fittedt1 and fittedt2 are. You call them the
>first stage fitted values for the the excluded IVs, but excluded
>exogenous variables never get "fitted" when you do 2SLS - what would
>you regress z1 and z2 on?
>> This method should also provide suitable estimates.
>> I have reviewed some of the past postings to the Stata list and
>> this method proposed when the endogenous regression was based on a
>> probit model. I assume that your proposed method and this
>> would result in suitable estimates. Is there any reason to prefer
>> method over another. For example, using your method would provide
>> meaningful output for the test statistics regarding the
>> Greg Dybalski
>> >I'm not quite sure I understand what you're asking for.
>> >ivreg2 does standard IV. Internally, there is only one stage,
>> >I suppose is standard for packages these days - "2SLS" is a
>> >archaic term and it isn't common to do IV in two steps any more.
>> >In any case, if it's standard IV that you want to do, you should be
>> >able to write down a model that can be estimate in one stage; if
>> >can't, then it isn't IV.
>> >In your case, say for example you have two periods. You have one
>> >endogenous variable and a set of excluded instruments that I
>> >are also time-varying. You want to know if the coeff on the endog
>> >regressor changes over time. What's wrong with the following?
>> >- say the equation in the original form has 3 regressors, one of
>> >which is endogenous, and 2 excluded instruments:
>> >ivreg2 y x1 x2 (y1=z1 z2)
>> >- Interact your endog regressor y1 with time so that you have two
>> >such regressors, y1_t1 and y1_t2
>> >- Interact your excluded instruments with time to get four such
>> >z1_t1 z1_t2 z2_t1 z2_t2
>> >- Estimate
>> >ivreg2 y x1 x2 (y1_t1 y1_t2 = z1_t1 z1_t2 z2_t1 z2_t2)
>> >and test the equality of the coefficients on y1_t1 and y1_t2.
>> >Probably there's something wrong with this, but a specific example
>> >might help to clarify the question.
>> >Date sent: Tue, 23 Nov 2004 11:14:53 -0500
>> >From: "Gregory Dybalski" <DybalskiG@gao.gov>
>> >To: <email@example.com>
>> >Subject: st: Is there a way to use ivreg2 without running
>> the first stage
>> > regression?
>> >Send reply to: firstname.lastname@example.org
>> >> Hi,
>> >> I am estimating an instrumental variable model having one
>> >> variable on the right hand side (RHS) of the equation. The
>> >> estimated from panel data, having fixed effects, and correcting
>> >> autocorrelation; heteroscedasicity does not appear to be much of
>> >> problem.
>> >> Now, I want to re-examine the model where the coefficient for
>> >> endogenous variable varies over several time periods. The
>> >> to do this would be to take the fitted values from the
>> >> generate the needed instruments. For example, the values for
>> >> instrument in the initial time period would be equal to the
>> >> fitted values and zero for the other time periods. The
>> >> instruments would be generated similarly. What I want to do is
>> >> ivreg2 without running the '1st stage regression'. So, is there
>> >> where I can enter the actual and fitted values for the RHS
>> >> variable into ivreg2? Or is there another Stata procedure that
>> >> estimate the model having these above features.
>> >> Obviously, I can estimate the model with the fitted values using
>> >> regression procedure, and the model coefficients would be
>> >> estimated, but the variances would not be.
>> >> Greg
>> >> *
>> >> * 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/
>> >Prof. Mark E. Schaffer
>> >Centre for Economic Reform and Transformation
>> >Department of Economics
>> >School of Management & Languages
>> >Heriot-Watt University, Edinburgh EH14 4AS UK
>> >44-131-451-3494 direct
>> >44-131-451-3008 fax
>> >44-131-451-3485 CERT administrator
>> * 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/
>Prof. Mark E. Schaffer
>Centre for Economic Reform and Transformation
>Department of Economics
>School of Management & Languages
>Heriot-Watt University, Edinburgh EH14 4AS UK
>44-131-451-3485 CERT administrator
* For searches and help try: