Bookmark and Share

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, is already up and running.

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

re: st: IVreg2 on interaction term

From   Kit Baum <>
Subject   re: st: IVreg2 on interaction term
Date   Wed, 14 Apr 2010 11:57:14 -0400


I would very much appreciate if you could help me with the following 
concern on IVreg2.

I have an interaction term of two dummy variables (d1, d2), the first is 
endogenous, d2 is very probably not. I have 1 instrument for d1. I read 
that an IV-regression in this case must include at least two instruments: 
my IV for d1 and IV*d2 for the interaction term. My problem is now a 
technical one: I do not know how to write an ivreg2-command including two 
IVs. The following does not work and replies "Invalid syntax"

Ivreg2   d2   (d1  =  iv)   (d1_d2  =    iv_d2)

I would very much appreciate if you could point out how such a regression 
is written.

If you allow, I would like to ask a second question. Is it possible to use 
newey2 in an IV-regression (I need autocorrelation robust standard errors; 
data is an unbalanced panel).

Re the syntax examples in the help file, what you want is

ivreg2 depvar d2 (d1 d1_d2 = iv iv_d2)

I presume that you inadvertently omitted the name of the dependent variable.

ivreg2 with -robust bw()- options will provide HAC standard errors. But if you have a panel,
what you want is Mark Schaffer's xtivreg2, which is a 'wrapper' for ivreg2. Same options apply.

Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index