Skip to contents

log T = x'beta + sigma W. Coefficients act MULTIPLICATIVELY ON TIME rather than on the hazard, so exp(beta) is a time ratio and not a hazard ratio.

Usage

Aftfit(time, event, X, dist = "weibull", alpha = 0.05)

morie_survival_aft(time, event, X, dist = "weibull", alpha = 0.05)

Arguments

time

observed follow-up times.

event

event indicator, 1 = event, 0 = censored.

X

covariate matrix, one row per subject.

dist

distribution of the error term.

alpha

significance level for the intervals.

Value

list with the coefficients, standard errors, time ratios, the scale and the log-likelihood.

References

Kalbfleisch, J. D. and Prentice, R. L. (2002). The Statistical Analysis of Failure Time Data, 2nd ed., Wiley, Chapter 3.

Examples

Aftfit(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0),
  X = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $dist
#> [1] "weibull"
#> 
#> $coef
#> [1] 0.4173392 0.2363297
#> 
#> $log_scale
#> [1] -2.733679
#> 
#> $scale
#> [1] 0.06497981
#> 
#> $loglik
#> [1] 2.494852
#> 
#> $n_par
#> [1] 3
#> 
#> $n
#> [1] 8
#> 
#> $n_events
#> [1] 4
#> 
#> $aic
#> [1] 1.010295
#> 
#> $bic
#> [1] 1.24862
#> 
#> $fixed_scale
#> [1] FALSE
#> 
#> $convergence
#> [1] 0
#> 
#> $intercept
#> [1] 0.4173392
#> 
#> $beta
#> [1] 0.2363297
#> 
#> $time_ratio
#> [1] 1.266592
#> 
#> $alpha
#> [1] 0.05
#> 
#> $positive_coef_means_longer_survival
#> [1] TRUE
#> 
#> $ph_coef
#> [1] -3.636971
#> 
#> $hazard_ratio
#> [1] 0.02633198
#> 
#> $ph_equivalent
#> [1] TRUE
#> 
#> $method
#> [1] "accelerated failure time, log T = x'beta + sigma W"
#>