Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 2 | survreg.aft(Formula, init = NULL, Data, model = "weibull",
iter.max = 150)
|
Formula |
a formula of the form
The linear predictor is speficified by the
|
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,
|
Data |
a data frame in which to interpret the variables named in the Formula. |
model |
assumed distribution for survival times. Available options are
|
iter.max |
maximum number of iterations for optimization (default is 150). |
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:
Weibull: h(t) = κρ(ρt)^{κ-1}
Log-logistic: h(t) = κρ(ρt)^{κ-1}/[1+(ρt)^κ]
Log-normal: h(t) = f(t)/S(t), whete S(t) is the survivor function
Generalized gamma: h(t) = f(t)/S(t), whete S(t) is the survivor function
Exponentiated Weibull: h(t) =κγρ(ρt)^{κ-1} (1- exp[-(ρt)^κ])^{γ-1} exp[-(ρt)^κ]/ [1-(1- exp[-(ρt)^κ])^γ]
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.
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.
Shahedul Khan <khan@math.usask.ca>
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.
LR.test, surv.resid,
survreg, coxph.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.