Hi Carlo,
On my second question regarding the categorical variable with 3 values (0, 1 and 2) (post #13) your answer was: 2) no, the code does not change.
When I put the code in by hand instead of c.regen##i.categorical, I have to specify the model as follows:
beta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error.
This seems different than your answer that the model does not change if period was a categorical with 3 values:
xtreg <depvar> =b0 + b1ReGen + b2Period + b3ReGen*Period + b4Firmsize + error
(I left the b2*categoricalvar out because fixed-eeffect models omit those anyway)
Am i right to assume that ' eta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error ' is the right answer? This is important as I have to write the model down in my thesis and I can't write that I did c.regen##i.period
Second question: If I am only interested in the interaction between regen and the categorical (3 values) variable, c.regen##i.categoricalvar also includes the b2Categoricalvar (e.g. b2Period) although I am not interested in that one but in the interaction with regen only. Is it in this case better to not use c.regen##i.categoricalvar but to use:
xtreg beta regen regen*catevar==1dummy regen*catevar==2dummy, fe robust ?
I am asking this because the coefficients and p-values are different when excluding the b2Catevar
I look forward to your answer.
Kind regards,
Julian
On my second question regarding the categorical variable with 3 values (0, 1 and 2) (post #13) your answer was: 2) no, the code does not change.
When I put the code in by hand instead of c.regen##i.categorical, I have to specify the model as follows:
beta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error.
This seems different than your answer that the model does not change if period was a categorical with 3 values:
xtreg <depvar> =b0 + b1ReGen + b2Period + b3ReGen*Period + b4Firmsize + error
(I left the b2*categoricalvar out because fixed-eeffect models omit those anyway)
Am i right to assume that ' eta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error ' is the right answer? This is important as I have to write the model down in my thesis and I can't write that I did c.regen##i.period
Second question: If I am only interested in the interaction between regen and the categorical (3 values) variable, c.regen##i.categoricalvar also includes the b2Categoricalvar (e.g. b2Period) although I am not interested in that one but in the interaction with regen only. Is it in this case better to not use c.regen##i.categoricalvar but to use:
xtreg beta regen regen*catevar==1dummy regen*catevar==2dummy, fe robust ?
I am asking this because the coefficients and p-values are different when excluding the b2Catevar
I look forward to your answer.
Kind regards,
Julian
Comment