Reparameterization [🇷 for BE/BA]
Dear ElMaestro, dear bears,
Let me throw my 2 cents into this discussion.
What are we talking about?
If I understand it, about re-parameterization to solve the equations for the coefficients of the ANOVA model(s).
Recall your very first lessons about ANOVA (as I had to do) to remember that the ANOVA model in case of categorical effects (factors) is over-parameterized.
To solve nevertheless constraints on the coefficients of the model have to imposed.
Historical the first? and very common, covered in many statistical textbooks, is the "sum to zero" re-parameterization, i.e. all coefficients for the various levels of a distinct factor sum to zero.
This results in the intercept being the overall mean of the independent variable as ElMaestro noticed (using a variant of this, the so called "Helmert contrast", which I never had understood fully
).
The correct specification in R for the simple "sum to zero" is
Other common re-parameterization is the "set to zero".
This is done by simply setting the coefficient of one (reference) level of a factor to zero.
R slang for that is
This is also the setting of "The power to know" with the solely difference that R / S and other statistical software sets the first level to zero and SAS the last. As always SAS is outstanding
.
This is the reason why Yung-jin has noticed the same results in R and SAS after recoding the last level being the first.
BTW you can obtain the same results without recoding if you use
The "set to zero" re-parameterization yields an intercept, that is not! in general the overall mean of the independent variable, as Yung-jin's statement suggests:
Therefore, Yung-jin, check your SAS results.
There are other re-parameterizations out there. But do not ask me why and what they really mean and what they are good for.
BTW: Don't ask me further, what "contr.poly" stands for in the R code above. I'm a very beginneR.
BTW2: Dear ElMaestro. Intelligence is not a linear function of brain size nor brain weight as neuro science has long ago recognized.
The German saying "Leave the thinking to the horses, they have a greater head" is definitely not true!
BTW3: IMHO there is no definite advantage or disadvantage of the re-parameterization with respect to the BE test, as you can see if you calculate the difference and CI of factor levels.
Only the interpretation of the "raw" coefficients of the ANOVA model are changed.
Let me throw my 2 cents into this discussion.
What are we talking about?
If I understand it, about re-parameterization to solve the equations for the coefficients of the ANOVA model(s).
Recall your very first lessons about ANOVA (as I had to do) to remember that the ANOVA model in case of categorical effects (factors) is over-parameterized.
To solve nevertheless constraints on the coefficients of the model have to imposed.
Historical the first? and very common, covered in many statistical textbooks, is the "sum to zero" re-parameterization, i.e. all coefficients for the various levels of a distinct factor sum to zero.
This results in the intercept being the overall mean of the independent variable as ElMaestro noticed (using a variant of this, the so called "Helmert contrast", which I never had understood fully

The correct specification in R for the simple "sum to zero" is
options(contrasts = c("contr.sum", "contr.poly"))
.Other common re-parameterization is the "set to zero".
This is done by simply setting the coefficient of one (reference) level of a factor to zero.
R slang for that is
options(contrasts = c("contr.treatment", "contr.poly"))
.This is also the setting of "The power to know" with the solely difference that R / S and other statistical software sets the first level to zero and SAS the last. As always SAS is outstanding

This is the reason why Yung-jin has noticed the same results in R and SAS after recoding the last level being the first.
BTW you can obtain the same results without recoding if you use
library(nlme) # needed for the contrast contr.SAS
options(contrasts=c(factor="contr.SAS",ordered="contr.poly"))
The "set to zero" re-parameterization yields an intercept, that is not! in general the overall mean of the independent variable, as Yung-jin's statement suggests:
❝ We have tested R codes of your examples with SAS. And SAS comes out the
❝ correct answer with intercept equal to the mean. [...]
Therefore, Yung-jin, check your SAS results.
There are other re-parameterizations out there. But do not ask me why and what they really mean and what they are good for.
BTW: Don't ask me further, what "contr.poly" stands for in the R code above. I'm a very beginneR.
BTW2: Dear ElMaestro. Intelligence is not a linear function of brain size nor brain weight as neuro science has long ago recognized.
The German saying "Leave the thinking to the horses, they have a greater head" is definitely not true!
BTW3: IMHO there is no definite advantage or disadvantage of the re-parameterization with respect to the BE test, as you can see if you calculate the difference and CI of factor levels.
Only the interpretation of the "raw" coefficients of the ANOVA model are changed.
—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Mean as intercept; model matrices ElMaestro 2009-05-20 20:35
- Mean as intercept; model matrices yjlee168 2009-05-21 13:35
- Mean as intercept; model matrices ElMaestro 2009-05-21 14:30
- Mean as intercept; model matrices ElMaestro 2009-05-22 14:39
- Mean as intercept; model matrices yjlee168 2009-05-23 20:06
- Mean as intercept; model matrices Aceto81 2009-05-26 10:28
- Mean as intercept; model matrices yjlee168 2009-05-23 19:30
- Mean as intercept; model matrices ElMaestro 2009-05-23 19:53
- Reparameterizationd_labes 2009-05-25 11:47
- Reparameterization yjlee168 2009-05-25 14:17
- Reparameterization ElMaestro 2009-05-25 20:29
- Reparameterized brain d_labes 2009-05-26 08:01
- Mean as intercept; model matrices yjlee168 2009-05-21 13:35