Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Is there a way to use ivreg2 without running the first stageregression?


From   "Gregory Dybalski" <[email protected]>
To   <[email protected]>
Subject   st: Is there a way to use ivreg2 without running the first stageregression?
Date   Wed, 24 Nov 2004 10:31:59 -0500

Prof. Mark E. Schaffer,

 I appreciate your reply, it was quite helpful.  Your method should
work.

I have an similar alternative method that I would like you to comment
on.  I referred to the archaic '2SLS' method because I am switching from
Limdep (ver 8), which, in fact, forces the user to perform IV estimation
in two steps.  I originally estimated the model in Limdep because it had
a procedure to estimate a fixed effects model using IV that corrects for
autocorrelation.  Your recent changes to the ivreg2 procedure now
provide for such estimation.

Background

You correctly stated the basic model that I want to estimate using
Stata,
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 the
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 interaction
between the estimated 1st stage values and the dummy variable for the
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 additional
variables by interacting the y1 and the excluded instruments with a
dummy variable.  Your method interacts the excluded instruments with the
dummy variable but does not interact the included exogenous variables,
x1 & x2, with the dummy.  Your method & mine will not result in the same
estimated values, but I am not sure that it matters.  

Proposed Alternative Method 

I have an alternative method that I would like you to comment on.  What
happens if I substitute the '1st stage' fitted values for the excluded
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)
This method should also provide suitable estimates.  

I have reviewed some of the past postings to the Stata list and found
this method proposed when the endogenous regression was based on a
probit model.   I assume that your proposed method and this alternative
would result in suitable estimates.  Is there any reason to prefer one
method over another.  For example, using your method would provide
meaningful output for the test statistics regarding the overidenfying
restrictions.  

Greg Dybalski

>Gregory,
>
>I'm not quite sure I understand what you're asking for.
>
>ivreg2 does standard IV.  Internally, there is only one stage, which 
>I suppose is standard for packages these days - "2SLS" is a somewhat 
>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 you 
>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 suppose 
>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 IVs, 
>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.
>
>--Mark
>
>Date sent:      	Tue, 23 Nov 2004 11:14:53 -0500
>From:           	"Gregory Dybalski" <[email protected]>
>To:             	<[email protected]>
>Subject:        	st: Is there a way to use ivreg2 without running
the first stage
>	regression?
>Send reply to:  	[email protected] 
>
>> Hi,
>>  
>> I am estimating an instrumental variable model having one
endogenous
>> variable on the right hand side (RHS) of the equation.  The model
is
>> estimated from panel data, having fixed effects, and correcting for
>> autocorrelation; heteroscedasicity does not appear to be much of a
>> problem.  
>>  
>> Now, I want to re-examine the model where the coefficient for the
RHS
>> endogenous variable varies over several time periods.  The simplest
way
>> to do this would be to take the fitted values from the first-stage
and
>> generate the needed instruments.  For example, the values for the
>> instrument in the initial time period would be equal to the
original
>> fitted values and zero for the other time periods.  The remaining
>> instruments would be generated similarly.  What I want to do is use
>> ivreg2 without running the '1st stage regression'.  So, is there a
way
>> where I can enter the actual and fitted values for the RHS
endogenous
>> variable into ivreg2?  Or is there another Stata procedure that
could
>> estimate the model having these above features.
>>  
>> Obviously, I can estimate the model with the fitted values using a
>> regression procedure, and the model coefficients would be properly
>> 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
>Director
>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
>http://www.som.hw.ac.uk/cert 
>

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