Fast Regression for the Accelerated Failure Time (AFT) Model

Yijian Huang (yhuang5@emory.edu)

Package fastAFT performs fast censored linear regression for the accelerated failure time (AFT) model of Huang (2013).

Installation

fastAFT is available on CRAN:

install.packages("fastAFT")

Fast censored linear regression

This procedure is illustrated with the Mayo primary biliary cholangitis dataset as given in package survival.

## Mayo PBC data
library(survival)
pbc_analy <- as.matrix(na.omit(pbc[,c("time","status","age","edema","bili","albumin","protime")]))
# log transformation for time, bili, albumin, and protime
pbc_analy[,c(1,5:7)] <- log(pbc_analy[,c(1,5:7)])
colnames(pbc_analy)[c(1,5:7)] <- paste("log",colnames(pbc_analy)[c(1,5:7)])
# convert status to censoring indicator
pbc_analy[,2] <- pbc_analy[,2]>1

## Fast censored linear regression
# Gehan weight
library(fastAFT)
fit.g <- faft(pbc_analy[,1],pbc_analy[,2],pbc_analy[,-c(1,2)],weight="Gehan")
fit.g
#> $weight
#> [1] "Gehan"
#> 
#> $beta
#> [1] -0.02549952 -0.92412231 -0.55811512  1.49837857 -2.77646687
#> 
#> $va
#>               [,1]          [,2]          [,3]         [,4]         [,5]
#> [1,]  0.0000366406 -0.0003577235  0.0001358624 0.0004583965 -0.001044045
#> [2,] -0.0003577235  0.0455455105 -0.0010112747 0.0249373432 -0.036766480
#> [3,]  0.0001358624 -0.0010112747  0.0045359974 0.0072801994 -0.022131922
#> [4,]  0.0004583965  0.0249373432  0.0072801994 0.2643719225  0.074493701
#> [5,] -0.0010440445 -0.0367664801 -0.0221319222 0.0744937012  0.604187156
#> 
#> $qif
#> [1] 1.652073e-06
#> 
#> $message
#> [1] "success"
#> 
#> $imsg
#> [1] 0
#> 
#> $beta1stp
#> [1] -0.02513122 -0.91952836 -0.55245514  1.49800515 -2.73113455
#> 
#> $qif1stp
#> [1] 0.02322713
#> 
#> $betainit
#> [1] -0.02499105 -0.83864113 -0.55202403  1.46409001 -2.11973992
#> 
#> $qifinit
#> [1] 1.790893
# logrank weight
fit.l <- faft(pbc_analy[,1],pbc_analy[,2],pbc_analy[,-c(1,2)],weight="logrank")
fit.l
#> $weight
#> [1] "logrank"
#> 
#> $beta
#> [1] -0.02578363 -0.71082797 -0.57494006  1.63506302 -1.84854122
#> 
#> $va
#>               [,1]          [,2]          [,3]         [,4]          [,5]
#> [1,]  2.657226e-05 -0.0001535839  4.308784e-05 0.0003384092 -5.294887e-05
#> [2,] -1.535839e-04  0.0543384863 -3.602356e-04 0.0433629858 -2.580506e-02
#> [3,]  4.308784e-05 -0.0003602356  3.358849e-03 0.0042775322 -9.645149e-03
#> [4,]  3.384092e-04  0.0433629858  4.277532e-03 0.2672978288  4.598259e-02
#> [5,] -5.294887e-05 -0.0258050586 -9.645149e-03 0.0459825945  4.787629e-01
#> 
#> $qif
#> [1] 3.209577e-06
#> 
#> $message
#> [1] "success"
#> 
#> $imsg
#> [1] 0
#> 
#> $beta1stp
#> [1] -0.02601255 -0.74051774 -0.57580009  1.60894096 -1.81817896
#> 
#> $qif1stp
#> [1] 0.00877687
#> 
#> $betainit
#> [1] -0.02499105 -0.83864113 -0.55202403  1.46409001 -2.11973992
#> 
#> $qifinit
#> [1] 0.5322754

References

Huang, Y. (2013) Fast censored linear regression. Scandinavian Journal of Statistics 40, 789–806.