Hi,
I am trying to add interaction terms into a simple new command. Something simple like this:
Sine Stata 11 I think factor variable (fv) accept interactions term. Yet when I do:
or
with mu and nu numerical and categorical variable, I get the following message:
interactions not allowed. Surprisingly the command
runs but does consider mu and nu as continuous.
Similarly,
gives me:
variable mu*i.nu not found
(error in option control())
Any idea on how to specify interaction in a syntax command?
Thanks
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
Code:
newreg y x, cont(mu##nu)
Code:
newreg y x, cont(mu#nu)
interactions not allowed. Surprisingly the command
Code:
newreg y x, cont(c.mu##c.nu)
Similarly,
Code:
newreg y x, cont(i.mu*i.nu)
variable mu*i.nu not found
(error in option control())
Any idea on how to specify interaction in a syntax command?
Thanks
Comment