R/aftgee.R
aftgee.Rd
Fits a semiparametric accelerated failure time (AFT) model with leastsquares approach. Generalized estimating equation is generalized to multivariate AFT modeling to account for multivariate dependence through working correlation structures to improve efficiency.
aftgee(formula, data, subset, id = NULL, contrasts = NULL, weights = NULL, margin = NULL, corstr = "independence", binit = "srrgehan", B = 100, control = aftgee.control())
formula  a formula expression, of the form 

data  an optional data.frame in which to interpret the variables occurring
in the 
subset  an optional vector specifying a subset of observations to be used in the fitting process. 
id  an optional vector used to identify the clusters.
If missing, then each individual row of 
contrasts  an optional list. 
weights  an optional vector of observation weights. 
margin  a 
corstr  a character string specifying the correlation structure. The following are permitted:

binit  an optional vector can be either a numeric vector or a character string specifying the initial slope estimator.
The default value is "srrgehan". 
B  a numeric value specifies the resampling number. When B = 0, only the beta estimate will be displayed. 
control  controls maxiter and tolerance. 
An object of class "aftgee
" representing the fit.
The aftgee
object is a list containing at least the following components:
a vector of initial value and a vector of point estimates
a vector of point estimates
estimated covariance matrix
a vector of initial value
estimated initial covariance matrix
a character string specifying the initial estimator.
An integer code indicating type of convergence after GEE
iteration. 0 indicates successful convergence; 1 indicates that the
iteration limit maxit
has been reached
An integer code indicating type of convergence for
initial value. 0 indicates successful convergence; 1 indicates that the
iteration limit maxit
has been reached
An integer code indicating the step until convergence
Chiou, S., Kim, J. and Yan, J. (2014) Marginal Semiparametric Multivariate Accelerated Failure Time Model with Generalized Estimating Equation. Life Time Data, 20(4): 599618.
Jin, Z. and Lin, D. Y. and Ying, Z. (2006) On Leastsquares Regression with Censored Data. Biometrika, 90, 341353.
library(survival) library(copula) datgen < function(n = 100, tau = 0.3, cen = 75.4, dim = 2) { kt < iTau(claytonCopula(1), tau) copula < claytonCopula(kt, dim = dim) id < rep(1:n, rep(dim, n)) x1 < rbinom(dim * n, 1, 0.5) x2 < rnorm(dim * n) ed < mvdc(copula, rep("weibull", dim), rep(list(list(shape = 1)), dim)) e < c(t(rMvdc(n, ed))) T < exp(2 + x1 + x2 + e) cstime < runif(n, 0, cen) delta < (T < cstime) * 1 Y < pmin(T, cstime) out < data.frame(T = T, Y = Y, delta = delta, x1 = x1, x2 = x2, id = rep(1:n, each = dim)) out } set.seed(1) mydata < datgen(n = 50, dim = 2) summary(aftgee(Surv(Y, delta) ~ x1 + x2, data = mydata, id = id, corstr = "ind", B = 8))#> Call: #> aftgee(formula = Surv(Y, delta) ~ x1 + x2, data = mydata, id = id, #> corstr = "ind", B = 8) #> #> AFTGEE Estimator #> Estimate StdErr z.value p.value #> (Intercept) 2.927 0.103 28.371 <2e16 *** #> x1 0.939 0.361 2.599 0.009 ** #> x2 0.902 0.061 14.839 <2e16 *** #>  #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1#> Call: #> aftgee(formula = Surv(Y, delta) ~ x1 + x2, data = mydata, id = id, #> corstr = "ex", B = 8) #> #> AFTGEE Estimator #> Estimate StdErr z.value p.value #> (Intercept) 2.942 0.126 23.374 < 2.2e16 *** #> x1 0.922 0.206 4.478 < 2.2e16 *** #> x2 0.928 0.073 12.745 < 2.2e16 *** #>  #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1