Why are the signs of my coefficients are different?

My code is:

library(survival)
attach(veteran)
survreg(Surv(time,status)~karno+diagtime+age+prior+trt ,dist="w")


My analysis and the one in a book are as follows:

and

If you take a close look, you will see that the figures are almost the same,but the signs of the coefficients are opposite. Any idea how to fix this?

• Could you provide more detailed description? Do you compute the same model on the same data as in the example? – Tim Dec 5 '14 at 8:21
• Yes, the book and I used the same data called Veteran's lung cancer study. The data are on R, but I suspect the way data were coded to the software might be different – Günal Dec 5 '14 at 9:18

R's survreg seems to be using an accelerated failure time model representation of the form

$\text{Median}(\log(\text{Survival time})) = \alpha + X\beta$,

thus a positive sign means a positive impact to survival time. This is in contrast to the proportional hazards (PH) form used in your picture. There, a positive sign means positive impact on the hazard and thus negative impact on expected survival.

Cross-checking with the output of a non-parametric PH-regression:

# Input
coxph(Surv(time,status)~karno+diagtime+age+prior+trt)

# Output
coef exp(coef) se(coef)      z       p
karno    -0.03408     0.966  0.00534 -6.381 1.8e-10
diagtime  0.00172     1.002  0.00900  0.191 8.5e-01
age      -0.00388     0.996  0.00925 -0.420 6.7e-01
prior    -0.00776     0.992  0.02215 -0.350 7.3e-01
trt       0.19305     1.213  0.18645  1.035 3.0e-01


The signs correspond to the ones shown in the book.

• Note that Weibull regression is the only parametric model that has both accelerated failure representation and PH representation. – Michael M Dec 5 '14 at 12:26