Hi,

Suppose, I have three variables: An outcome, a dummy variable D=0,1, and a variable with three values E=1,2,3.

I want to estimate the following interacted model (without constant):

Code:
gen E1 = E == 1
gen E2 = E == 2
gen E3 = E == 3
gen D_E1 = E1 * D
gen D_E2 = E2 * D
gen D_E3 = E3 * D

reg Y E1 E2 E3 D_E1 D_E2 D_E3, nocons
I'd like to use the stata factor variable notation for this purpose. However, I am not sure whether or not this is possible. When I type

Code:
reg Y i.E##i.D, nocons,
Stata includes a Dummy for E1, for E2, for D1, and interactions for E1#D1 and E2#D1. My model. however, should not include the non-interacted effect of D1 (see above).

Thank you so much!