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

st: creating interaction variables


From   TEWODAJ MOGUES <[email protected]>
To   Stata _ <[email protected]>
Subject   st: creating interaction variables
Date   Mon, 14 Jun 2004 10:52:31 -0400

Richard and Joseph,

Many thanks for your suggestions which I just read upon returning from my short leave. I downloaded xi3, and indeed it seems to be able to do what xi can't, namely interact two continuous variables (which is what I'm interested in). The only downside -- unless I'm missing something about the proper use of xi3 -- is that it automatically includes the lower order terms. Richard, you're right, in many contexts that is good, but oftentimes I just want to do, say, 

tobit y  x1_x2  x3  x4 , ll

However, when I type the command

xi3: tobit y  x1*x2  x3  x4 , ll

I get identical results as if I typed

tobit y  x1  x2  x1_x2  x3  x4 , ll

where I created the interaction x1_x2 through the gen command. So if I don't want lower-order terms, does that mean that I have to resort to generating interactions manually after all? 

Tewodaj
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
Tewodaj Mogues
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706

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