Fits a semiparametric accelerated failure time (AFT) model with rank-based approach. General weights, additional sampling weights and fast sandwich variance estimations are also incorporated. Estimating equations are solved with Barzilar-Borwein spectral method implemented as BBsolve in package BB.

aftsrr(formula, data, subset, id = NULL, contrasts = NULL, weights = NULL,
B = 100, rankWeights = c("gehan", "logrank", "pw", "gp", "userdefined"),
eqType = c("is", "ns", "mns", "mis"), se = c("NULL", "bootstrap", "MB",
"ZLCF", "ZLMB", "sHCF", "sHMB", "ISCF", "ISMB"), control = list())

## Arguments

formula a formula expression, of the form response ~ predictors. The response is a Surv object object with right censoring. See the documentation of lm, coxph and formula for details. an optional data frame in which to interpret the variables occurring in the formula. an optional vector specifying a subset of observations to be used in the fitting process. an optional vector used to identify the clusters. If missing, then each individual row of data is presumed to represent a distinct subject. The length of id should be the same as the number of observation. an optional list. an optional vector of observation weights. a numeric value specifies the resampling number. When B = 0, only the beta estimate will be displayed. a character string specifying the type of general weights. The following are permitted: logranklogrank weight gehanGehan's weight PWPrentice-Wilcoxon weight GPGP class weight a character string specifying the type of the estimating equation used to obtain the regression parameters. The following are permitted: nonsmRegression parameters are estimated by directly solving the nonsmooth estimating equations. smRegression parameters are estimated by directly solving the induced-smoothing estimating equations. monosmRegression parameters are estimated by iterating the monotonic smoothed estimating equations. This is typical when rankWeights = "PW" and rankWeights = "GP". a character string specifying the estimating method for the variance-covariance matrix. The following are permitted: bootstrapnonparametric bootstrap, MBmultiplier resampling. ZLCFZeng and Lin's approach with closed form Si. ZLMBZeng and Lin's approach with empirical Si. sHCFHuang's approach with closed form Si. sHMBHuang's approach with empirical Si. ISCFJohnson and Strawderman's sandwich variance estimates with closed form Si. ISMBJohnson and Strawderman's sandwich variance estimates with empirical Si. jsJohnson and Strawderman's iterating approach. controls equation solver, maxiter, tolerance, and resampling variance estimation. The available equation solvers are BBsolve and dfsane of the BB package. Instead of searching for the zero crossing, options including BBoptim and optim will return solution from maximizing the corresponding objective function.

## Value

aftsrr returns an object of class "aftsrr" representing the fit. An object of class "aftsrr" is a list containing at least the following components:

beta

A vector of beta estimates

covmat

A list of covariance estimates

convergence

An integer code indicating type of convergence.

bhist

When variance = "MB", bhist gives the bootstrap samples.

## References

Chiou, S., Kang, S. and Yan, J. (2014) Fast Accelerated Failure Time Modeling for Case-Cohort Data. Statistics and Computing, 24(4): 559--568.

Chiou, S., Kang, S. and Yan, J. (2014) Fitting Accelerated Failure Time Model in Routine Survival Analysis with R Package Aftgee. Journal of Statistical Software, 61(11): 1--23.

Huang, Y. (2002) Calibration Regression of Censored Lifetime Medical Cost. Journal of American Statistical Association, 97, 318--327.

Johnson, L. M. and Strawderman, R. L. (2009) Induced Smoothing for the Semiparametric Accelerated Failure Time Model: Asymptotic and Extensions to Clustered Data. Biometrika, 96, 577 -- 590.

Varadhan, R. and Gilbert, P. (2009) BB: An R Package for Solving a Large System of Nonlinear Equations and for Optimizing a High-Dimensional Nonlinear Objective Function. Journal of Statistical Software, 32(4): 1--26

Zeng, D. and Lin, D. Y. (2008) Efficient Resampling Methods for Nonsmooth Estimating Functions. Biostatistics, 9, 355--363

## Examples

## kidney data
library(survival)
data(kidney)
foo <- aftsrr(Surv(time, status) ~ age + sex, id = id,
data = kidney, se = c("ISMB", "ZLMB"), B = 10)
foo#> Call:
#> aftsrr(formula = Surv(time, status) ~ age + sex, data = kidney,
#>     id = id, B = 10, se = c("ISMB", "ZLMB"))
#>
#>  Coefficients:
#>          age          sex
#> -0.001237104  1.522001851
## nwtco data
library(survival)
data(nwtco)
subinx <- sample(1:nrow(nwtco), 668, replace = FALSE)
nwtco$subcohort <- 0 nwtco$subcohort[subinx] <- 1
pn <- table(nwtco$subcohort)[[2]] / sum(table(nwtco$subcohort))
nwtco$hi <- nwtco$rel + ( 1 - nwtco$rel) * nwtco$subcohort / pn
nwtco$age12 <- nwtco$age / 12
nwtco$study <- nwtco$study - 3
nwtco$histol = nwtco$histol - 1
sub <- nwtco[subinx,]
fit <- aftsrr(Surv(edrel, rel) ~ histol + age12 + study, id = seqno,
weights = hi, data = sub, B = 10, se = c("ISMB", "ZLMB"),
subset = stage == 4)
summary(fit)#> Call:
#> aftsrr(formula = Surv(edrel, rel) ~ histol + age12 + study, data = sub,
#>     subset = stage == 4, id = seqno, weights = hi, B = 10, se = c("ISMB",
#>         "ZLMB"))
#>
#> Variance Estimator: ISMB
#>        Estimate StdErr z.value p.value
#> histol   -4.318  1.250  -3.453   0.001 ***
#> age12    -0.051  0.250  -0.206   0.837
#> study    -1.794  1.808  -0.993   0.321
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Variance Estimator: ZLMB
#>        Estimate StdErr z.value p.value
#> histol   -4.318  0.413 -10.448  <2e-16 ***
#> age12    -0.051  0.127  -0.406   0.685
#> study    -1.794  0.760  -2.362   0.018 *
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1