Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: xtivreg2 and interaction terms


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: xtivreg2 and interaction terms
Date   Wed, 15 Sep 2010 21:59:31 +0100

Michael,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Klien, Michael
> Sent: 15 September 2010 16:14
> To: '[email protected]'
> Subject: st: xtivreg2 and interaction terms
> 
> Dear statalist users,
> 
> I am estimating a spatial lag model with fixed effects by 
> IV/GMM using xtivreg2:
> xtivreg2 y x (wy = wx),fe
> This estimation is fine. The problem occurs when I estimate 
> the spatial lag with a dummy interaction (d):
> xtivreg2 y x (wy_d0 wy_d1 = wx_d0 wx_d1),fe The resulting 
> coefficient estimates for wy_d0 and wy_d1 are almost the 
> same, which is very different from my ML results in matlab. I 
> found out that the difference between the two is that the 
> matlab routine first demeans all data and then generates the 
> interaction terms. With xtivreg2 and similar commands I need 
> to input the interacted variable, which is only demeaned 
> afterwards. If I demean my data manually in stata and use 
> ivreg2 the IV results are much closer to the ML results.
> So my question is, what is the correct approach? First demean 
> the data and then interact or the other way round? I was 
> unable to find a reference for such a case.

If you want to use the "fixed effects" estimation, then as a matter of
definition you have to group-demean all your variables, whether or not
they are standard variables or interactions.

That said, how you define your interaction terms is up to you.  It's
common practice, for example, to define interactions around sample
means, i.e., you demean the variables before multiplying them together
to get the interaction term.

HTH,
Mark

> 
> Thanks very much in advance!
> Michael
> 
> *
> *   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/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index