Hi all,
I would like to know if it is possible to alter the stata default factor variable list {1 0} to {1 -1}? The reason is that I want to run a factor effects ANOVA model via regress command. For example, for a two-factor study, factor A with 3 levels and factor B with 2 levels, I would usually generate the indicator variables manually:
X1 = {1 if case is level 1 for factor A, -1 if case is level 3, 0 otherwise}
X2 = {1 if case is level 2 for factor A, -1 if case is level 3, 0 otherwise}
X3 = {1 if case is level 1 for factor B, -1 if case is level 2}
The model is Y = u.. + aX1 + aX2 + bX3 + (ab)X1X3 + (ab)X2X3 + e <Symbol: u is miu; a is alpha; b is beta; e is epsilon>
The problem with manual coding of indicator variables is that I cannot utilise fully the margin function. Therefore I would like to know if it is possible to alter the default stata factor variable list?
Thank you in advance!
I would like to know if it is possible to alter the stata default factor variable list {1 0} to {1 -1}? The reason is that I want to run a factor effects ANOVA model via regress command. For example, for a two-factor study, factor A with 3 levels and factor B with 2 levels, I would usually generate the indicator variables manually:
X1 = {1 if case is level 1 for factor A, -1 if case is level 3, 0 otherwise}
X2 = {1 if case is level 2 for factor A, -1 if case is level 3, 0 otherwise}
X3 = {1 if case is level 1 for factor B, -1 if case is level 2}
The model is Y = u.. + aX1 + aX2 + bX3 + (ab)X1X3 + (ab)X2X3 + e <Symbol: u is miu; a is alpha; b is beta; e is epsilon>
The problem with manual coding of indicator variables is that I cannot utilise fully the margin function. Therefore I would like to know if it is possible to alter the default stata factor variable list?
Thank you in advance!