My code is:

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

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

enter image description here


enter image description here

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?

  • 1
    $\begingroup$ Could you provide more detailed description? Do you compute the same model on the same data as in the example? $\endgroup$ – Tim Dec 5 '14 at 8:21
  • $\begingroup$ 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 $\endgroup$ – 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

# 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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.