[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: creating interaction variables
I have a simple question. Suppose I want to include in a regression the interaction term x1*x2, where x1 and x2 are two variables. Is there any way for me to NOT have to first create a new variable, say by typing
gen x1_x2 = x1*x2 ?
I tried running a regression that looks like
regress y x1*x2 x3 x4
but that gives an error message. The problem is that I want to try out many different interaction terms with existing variables, and having to create new variables in the above fashion is really a big bother.
Thanks for any ideas,
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706
* For searches and help try: