Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: Re: test for exogeneity

 From "Jing Zhou" To "statalist@hsphsun2.harvard.edu" Subject st: Re: test for exogeneity Date Sun, 25 Jul 2010 11:56:53 +1000

```thank you kit.

i am going to test the endogeneity of x1 x2 x3 (all of them are might-be endogenous variables). what if not all the variables are endogenous? does that matter if i put all the three variables in the ()? e.g.

to test the endogeneity of x1: xtivreg2 dep (x1 x2 x3 = excluded instruments), fe endog(x1).

from your perspective, by doing so, i am testing x1 while treating both x2 and x3 as endogenous. if x2 or x3 is however exogenous, does this command still work well?

many thanks!

Jing

>>> Christopher Baum <kit.baum@bc.edu> 23/07/2010 11:01 pm >>>
<>
On Jul 23, 2010, at 2:33 AM, Jing wrote:

> I am going to use command "xtivreg2 dep var1 (var2=var_iv), endog (endogenous var)" to test for the suspicious endogenous variables in my model. suppose I have more than one endogenous variables. to detect all of them, can i put one suspicious variable into endog (endogenous var) option, and at the same time put other suspicious variables as the exogenous variables? that is, for example, x1 x2 x3 are considered as suspicious endogenous variables.if i want to test the endogeneity of x1, can i write the command like:
>
> xtivreg2 dep x2 x3 (x1=iv for x1), endog (x1)?
>
> for x2: xtivreg2 dep x1 x3 (x2=iv for x2), endog (x2)? ......

No. If your model contains several endogenous regressors, they should all go in the ( ). E.g.

xtivreg2 dep (x1 x2 x3 = excluded instruments), fe endog(whatever)

If whatever is x1 x2 x3, then you are testing whether you need IV or can use standard OLS fixed-effects (a Hausman test). If you put just one (or just two) of the might-be-endogenous regressors in the endog(), you are testing them while treating the others as endogenous. The endog() option effectively reruns the model, making what you have in endog() exogenous, and compares the J-statistics from those two models.

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html

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

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