Preferable contrasts?
Well, contr.SAS is part of nlme, and it would have been helpful to have told us so. As a general principle the interpretation of main effects in the presence of interactions depends on the coding except for a few special cases (least squares fitting, balance and true contrasts (e.g. not contr.treatment nor contr.SAS) spring to mind). So this not a question of `preferable contrasts' but understanding how coding works. One extreme view is never to look at the coefficients, only at predictions, and although a counsel of perfection it contains a lot of merit. Chapter 6 of MASS (any edition) comes highly recommended to those wishing to understand coding (and it's by WNV, not me).
On Thu, 7 Nov 2002, Grathwohl,Dominik,LAUSANNE,NRC/NT wrote:
Dear all, I'm working with Cox-regression, because data could be censored. But in this particular case not. Now I have a simple example: PRO and PRE are (0,1) coded. The response is not normal distributed. We are interested in a model which could describe interaction. But my results are depending strongly in the choose of the contrast option. It is clear that there is some dependence in the contrasts, but in this simple case I could get the vice versa effect. My R output:
options(contrasts = c(unordered = "contr.treatment", ordered =
"contr.poly"))
summary(coxph(Surv(ILOG, alive) ~ factor(PRO)*factor(PRE)))
...
coef exp(coef) se(coef) z p
factor(PRO)1 0.6576 1.930 0.302 2.177 0.029
factor(PRE)1 0.0681 1.070 0.304 0.224 0.820
factor(PRO)1:factor(PRE)1 -0.7703 0.463 0.431 -1.789 0.074
...
options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly")) summary(coxph(Surv(ILOG, alive) ~ factor(PRO)*factor(PRE)))
...
coef exp(coef) se(coef) z p
factor(PRO)0 0.113 1.119 0.304 0.370 0.710
factor(PRE)0 0.702 2.018 0.299 2.350 0.019
factor(PRO)0:factor(PRE)0 -0.770 0.463 0.431 -1.789 0.074
...
What would the experts recommend?
Kind regards,
Dominik
Dominik Grathwohl
Biostatistician
Nestlé Research Center
PO Box 44, CH-1000 Lausanne 26
Phone: + 41 21 785 8034
Fax: + 41 21 785 8556
e-mail: dominik.grathwohl at rdls.nestle.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._