Hello,
I'm trying to iterate over a regression changing a single variable for its self-interactions like this:
But I get an error message:
I need the c operator in order to set the interactions. I think this would be very straightforward for an experienced Stata person.
Can anybody give me an idea on how to address this?
Thank you so much in advance.
I'm trying to iterate over a regression changing a single variable for its self-interactions like this:
HTML Code:
foreach var of varlist c.myVar c.myVar#c.myVar c.myVar##c.myVar c.myVar#c.myVar#c.myVar c.myVar##c.myVar##c.myVar { reg y $controls `var', r }
HTML Code:
c: operator invalid
Can anybody give me an idea on how to address this?
Thank you so much in advance.
Comment