Hi,

I am trying to add interaction terms into a simple new command. Something simple like this:

Code:
cap program drop newreg
program define newreg
syntax [varlist],  CONTrol(varlist fv)

xi: reg `varlist' `control'

end
Sine Stata 11 I think factor variable (fv) accept interactions term. Yet when I do:

Code:
newreg y x, cont(mu##nu)
or

Code:
newreg y x, cont(mu#nu)
with mu and nu numerical and categorical variable, I get the following message:

interactions not allowed. Surprisingly the command

Code:
newreg y x, cont(c.mu##c.nu)
runs but does consider mu and nu as continuous.

Similarly,

Code:
newreg y x, cont(i.mu*i.nu)
gives me:

variable mu*i.nu not found
(error in option control())

Any idea on how to specify interaction in a syntax command?

Thanks