Accelerated failure time models

References

Load packages

library(survival)

Proportional Hazards Models

## Cox PH model
coxphFit <- coxph(Surv(futime, fustat) ~ ecog.ps + rx, ovarian)
summary(coxphFit)
## Call:
## coxph(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian)
## 
##   n= 26, number of events= 12 
## 
##           coef exp(coef) se(coef)     z Pr(>|z|)
## ecog.ps  0.370     1.447    0.587  0.63     0.53
## rx      -0.578     0.561    0.588 -0.98     0.33
## 
##         exp(coef) exp(-coef) lower .95 upper .95
## ecog.ps     1.447      0.691     0.458      4.57
## rx          0.561      1.783     0.177      1.77
## 
## Concordance= 0.622  (se = 0.088 )
## Rsquare= 0.054   (max possible= 0.932 )
## Likelihood ratio test= 1.45  on 2 df,   p=0.483
## Wald test            = 1.43  on 2 df,   p=0.49
## Score (logrank) test = 1.46  on 2 df,   p=0.481


## Exponential model
survregExp <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian,
                      dist = "exponential")
summary(survregExp)
## 
## Call:
## survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, 
##     dist = "exponential")
##              Value Std. Error      z           p
## (Intercept)  6.962      1.322  5.267 0.000000139
## ecog.ps     -0.433      0.587 -0.738 0.460583442
## rx           0.582      0.587  0.991 0.321858599
## 
## Scale fixed at 1 
## 
## Exponential distribution
## Loglik(model)= -97.2   Loglik(intercept only)= -98
##  Chisq= 1.67 on 2 degrees of freedom, p= 0.43 
## Number of Newton-Raphson Iterations: 4 
## n= 26
## AFT interpretation
## Geometric mean of survival time: 1055
## 1 unit change in ecog.ps shortens survival time by 0.65 times
## rx extends survival time by 1.79 times
exp(coef(survregExp))
## (Intercept)     ecog.ps          rx 
##   1055.5715      0.6485      1.7887
## PH interpretation (multiply by -1 before exp())
## 1 unit change in ecog.ps increases h(t) by 1.54 times
## rx decreases h(t) by 0.56 times
exp(-1 * coef(survregExp))
## (Intercept)     ecog.ps          rx 
##   0.0009474   1.5420839   0.5590576


## Weibull model
survregWeibull <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = "weibull")
summary(survregWeibull)
## 
## Call:
## survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, 
##     dist = "weibull")
##              Value Std. Error      z             p
## (Intercept)  6.897      1.178  5.857 0.00000000472
## ecog.ps     -0.385      0.527 -0.731 0.46500606630
## rx           0.529      0.529  0.999 0.31781959312
## Log(scale)  -0.123      0.252 -0.489 0.62453407096
## 
## Scale= 0.884 
## 
## Weibull distribution
## Loglik(model)= -97.1   Loglik(intercept only)= -98
##  Chisq= 1.74 on 2 degrees of freedom, p= 0.42 
## Number of Newton-Raphson Iterations: 5 
## n= 26

## Scale parameter
survregWeibull$scale
## [1] 0.8839
## Shape parameter
(shapeParameter <- 1 / survregWeibull$scale)
## [1] 1.131

## AFT interpretation
## Geometric mean of survival time: 999
## 1 unit change in ecog.ps shortens survival time by 0.68 times
## rx extends survival time by 1.69 times
exp(coef(survregWeibull))
## (Intercept)     ecog.ps          rx 
##    988.9988      0.6804      1.6966
## PH interpretation (multiply by -1 and shape parameter before exp())
## 1 unit change in ecog.ps increases h(t) by 1.55 times
## rx decreases h(t) by 0.55 times
exp(-1 * shapeParameter * coef(survregWeibull))
## (Intercept)     ecog.ps          rx 
##   0.0004086   1.5459383   0.5498547

Other AFT models

These only have AFT interpretation. They are not PH models.

## Log Normal model
survregLogNormal <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = "lognormal")
summary(survregLogNormal)
## 
## Call:
## survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, 
##     dist = "lognormal")
##              Value Std. Error      z            p
## (Intercept)  5.878      1.094  5.373 0.0000000772
## ecog.ps     -0.229      0.537 -0.427 0.6696229009
## rx           0.813      0.537  1.514 0.1300087962
## Log(scale)   0.167      0.228  0.731 0.4647596559
## 
## Scale= 1.18 
## 
## Log Normal distribution
## Loglik(model)= -95.9   Loglik(intercept only)= -97.1
##  Chisq= 2.35 on 2 degrees of freedom, p= 0.31 
## Number of Newton-Raphson Iterations: 3 
## n= 26

## Log Logistic model
survregLogLogistic <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = "loglogistic")
summary(survregLogLogistic)
## 
## Call:
## survreg(formula = Surv(futime, fustat) ~ ecog.ps + rx, data = ovarian, 
##     dist = "loglogistic")
##              Value Std. Error      z            p
## (Intercept)  6.161      1.134  5.435 0.0000000549
## ecog.ps     -0.336      0.537 -0.626 0.5315644473
## rx           0.705      0.539  1.308 0.1908146143
## Log(scale)  -0.363      0.248 -1.466 0.1427150886
## 
## Scale= 0.695 
## 
## Log logistic distribution
## Loglik(model)= -96.3   Loglik(intercept only)= -97.4
##  Chisq= 2.07 on 2 degrees of freedom, p= 0.36 
## Number of Newton-Raphson Iterations: 4 
## n= 26