Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: instrumental variable estimation problems


From   Michael Hanson <[email protected]>
To   [email protected]
Subject   Re: st: instrumental variable estimation problems
Date   Sat, 05 Dec 2009 17:56:14 -0500

Tunga:

Yes, it does matter, and would answer your questions had you followed the suggestions provided by Ekrem -- although you would have needed to do a little research of your own.


Note first:

-ivreg- is, according to the help file, "an out-of-date command as of Stata 10."

-ivreg2- is a user-contributed command. Do the following from Stata's Command window:

ssc install ivreg2
help ivreg2

Then read the help file for -ivreg2-, and you will see that most of your questions are addressed there. Personally, I would disagree with Ekrem that -ivreg2- is necessarily better than -ivregress 2sls- : which you use is more a matter of familiarity and convenience. (That said, the help file for -ivreg2- is a dense tour de force that rewards careful reading. So too does <http://fmwww.bc.edu/ec-p/wp667.pdf>. And -help ivregress-, which would have allowed you to answer (Q2) and (Q3) by yourself, should be on your reading list as well.)


In particular:

(Q1) Tests for endogenous regressors can be accomplished via -ivendog- after -ivreg2- or -estat endogenous- after -ivregess 2sls-. It is not necessary to go through the steps you propose.

(Q2) Just as Stata told you, -ivregress depend (endo = instone insttwo) exo)- is, indeed, invalid syntax. Ekrem was very explicit in answering your question: you need to include the estimator, which in your case is "2sls". See -help ivregress- for the correct syntax.

(Q3) -estat overid- is not a valid command following the outdated - ivreg-. It is valid for -ivregres 2sls-, but you did not run that command ("invalid syntax"), hence your second error message ("invalid subcommand overid") as it was the -ivreg- command that was the last estimator Stata saw.


Hope that helps.

Best,
Mike



On Dec 5, 2009, at 2:54 PM, Tunga Kantarci wrote:

Hello,

Sorry, that it is ivreg or ivreg2, does not answer any of my questions.




Hello Tunga,
if you use the command "ivreg2", and read the help file , you can
find how to test the endogeneity and overidentification.
For your second question with ivregress, you need to use an option
"2sls" after the command ivregress. But any way, it is better to use
ivreg2 for all your questions.

Ekrem Kalkan

2009/12/4 Tunga Kantarci <[email protected]>:
Hello,

I use Stata 10 and I would like to ask three questions regarding the iv
estimation with Stata.



Question 1
Suppose we have the following model:

depend = b1 + b2 endo + u

I want to test if endo is endogenous. The procedure is that you obtain the IV estimates of b1 and b2 and then obtain the residuals. Here the point is
that the residuals are obtained using the variable 'endo' and not the
'predicted endo' from the first stage of the TSLS.

My question is this: We obtain the IV estimates with the following command:

ivreg depend (endo = instone insttwo) exo

where depend is the dependent variable, endo is the suspicios endogenous
variable and we have two instruments for it. exo is just an exogenous
variable. I first run this regression. This produces IV estimates for b1 and b2. Then I want to get the residuals using these two estimates and the
variable 'endo'. Is it ok if I just use the command "predict resid,
residuals"? Or is this command producing residuals using the IV estimates of
b1 and b2 and the variable 'predicted endo'?



Question 2
When I type ivregress instead of ivreg (while running the model ivreg depend (endo = instone insttwo) exo) Stata gives the following error: depend not a valid estimator. What is the problem here? When I type ivreg it works, when
I type ivregress I get this error.



Question 3
When I type "estat overid" after I run the iv regression I get the following error: "invalid subcommand overid". Why estat overid command does not work?

Thanks.


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



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