Skip to content

Preferable contrasts?

3 messages · Grathwohl,Dominik,LAUSANNE,NRC/NT, Brian Ripley, Frank E Harrell Jr

#
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:
"contr.poly"))
...
                             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
...
...
                            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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
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:

            

  
    
#
On Thu, 7 Nov 2002 10:36:50 +0100
"Grathwohl,Dominik,LAUSANNE,NRC/NT" <dominik.grathwohl at rdls.nestle.com> wrote:

            
Think of what you want to estimate.  I like to think of differences in predicted values (or the anti-log of such differences, i.e., hazard ratios).  To make estimates independent of all coding decisions I wrote contrast.Design for the Design library.  Here is an example:

library(Design)   # from http://hesweb1.med.virginia.edu/biostat/s/Design.html
f <- cph(Surv(dtime,event) ~ PRO*PRE)  
# make PRO and PRE factors in the data frame
contrast(f, list(PRO='somevalue',PRE='somevalue'),
            list(PRO='someothervalue',PRE='someothervalue'))

The contrast compares predicted values for the two pairs of settings of (PRE,PRO).

Frank