survreg.aft: Fit a parametric AFT model to time-to-event data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/AFTfit.R

Description

Fit a parametric AFT model for right censored data using the maximum likelihood method. It includes both standard (non-recurrent) survival data analysis and recurrent event data analysis.

Usage

1
2
survreg.aft(Formula, init = NULL, Data, model = "weibull",
  iter.max = 150)

Arguments

Formula

a formula of the form response ~ model. The response is c(st, status) for standard survival analysis and c(start, stop, status) for recurrent event data analysis, where

  • st: survival time for right censored data,

  • status: censoring indicator,

  • start and stop: the start and end time of each time interval for recurrent event data.

The linear predictor is speficified by the model argument of the Formula expression. It consists of a series of terms (covariates) separated by + operators. It also allows : and * operators to define interaction terms.

  • Example 1: c(st, status) ~ z1 + z2 + z3

  • Example 2: c(start, stop, status) ~ z1 + z2 * z3

init

initial values for the parameters (optional). It is a matrix with each row has one set of initial values. If there are p regression coefficients β_1, β_2, ..., β_p, then each row has initial values with the following sequence: β_1, β_2, ..., β_p, log(κ), log(γ), log(ρ) for the exponentiated Weibull and generalized gamma models, and β_1, β_2, ..., β_p, log(κ), log(ρ) for the Weibull, log-logistic and log-normal models, where κ and γ are the shape parameters and ρ is the rate parameter (see below). That is, multiple sets of initial values can be given. For example, for the exponentiated Weibull model, init = rbind(c(rep(0, p), rep(0, 3)), c(rep(0, p), rep(0.5, 3))) gives two sets of initial values.

Data

a data frame in which to interpret the variables named in the Formula.

model

assumed distribution for survival times. Available options are "weibull", "lnormal", "llogistic", "eweibull" and "ggamma" for Weibull, log-normal, log-logistic, exponentiated Weibull and generalized gamma distributions, respectively. Default is "weibull". The probability density functions of these distributions are:

  • Weibull: f(t)=κρ(ρt)^{κ-1} exp[-(ρt)^κ]

  • Log-logistic: f(t) = κρ(ρt)^{κ-1}/[1+(ρt)^κ]^2

  • Log-normal: f(t) = κ exp[-(κlogt))^2/2]/[t(2π)^{1/2}]

  • Generalized gamma: f(t) = κρ(ρt)^{κγ-1} exp[-(ρt)^κ]/Γ(γ)

  • Exponentiated Weibull: f(t) =κγρ(ρt)^{κ-1} (1- exp[-(ρt)^κ])^{γ-1} exp[-(ρt)^κ]

iter.max

maximum number of iterations for optimization (default is 150).

Details

The AFT model is specified using the hazard function: h(t; z) = h_0[t exp(-z'β)] exp(-z'β), where h_0(.) is the baseline hazard function of the assumed distribution, z is the p x 1 vector of covariates, and β is the corresponding vector of regression coefficients (see Section 2.3 of Kalbfleisch and Prentice, and Section 3.2 of Cook and Lawless). The hazard functions of the distributions are:

For recurrent event analysis, each line of data for a given subject must include the start time and stop time for each interval of follow-up.

Value

Model: the survival model.

Data summary: number of observations, number of events, and number of predictors.

Fit: estimate, standard error, z, p value, and 95% confidence interval.

exp(est): exp(regression coefficient), and 95% confidence interval.

exp(-est): exp(- regression coefficient), and 95% confidence interval.

Fit criteria: log-likelihood, deviance, and AIC.

optimizer: nlminb or optim.

cov: covariance matrix.

st: survival times (for recurrent event, an n x 2 matrix for start and stop times).

design.mat: design matrix.

Author(s)

Shahedul Khan <khan@math.usask.ca>

References

Cook RJ and Lawless J, The statistical analysis of recurrent events, Springer, 2007.

Kalbfleisch JD and Prentice RL, The statistical analysis of failure time data, Wiley, 2002.

See Also

LR.test, surv.resid, survreg, coxph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Example 1: Recurrent Event Analysis
  library(frailtypack)
  data(readmission)
# Recoding sex and chemo
  sex<-factor(2-as.numeric(readmission$sex),
       labels=c("Female","Male"))
  chemo<-factor(as.numeric(readmission$chemo)-1,
         labels=c("NonTreated","Treated"))
  Data<-readmission
  Data$sex<-sex
  Data$chemo<-chemo
  fit.gg<-survreg.aft(c(t.start,t.stop,event)~sex+chemo+charlson,
      Data=Data,model="ggamma")
  fit.gg
  fit.gg$cov

# Example 2: Non-recurrent Data (Right Censored)
  library(survival)
  fit.ll<-survreg.aft(c(time,status)~karno+diagtime+age+prior+celltype+trt,
      Data=veteran,model="llogistic")
  fit.ll
  fit.ll$design.mat

sa4khan/AFTjmr documentation built on March 12, 2020, 1:24 a.m.