Learn R Programming

aftgee (version 0.3-5)

smoothrr: Smooth Rank Regression

Description

The smoothed gehan weight is used for the initial value. As proved in Johnson and Strawderman (2009), the smoooth gehan estimate is consistent.

Usage

smoothrr(formula, data, subset, id,
         Sigma = NULL,
         weight = NULL,
         binit = NULL,
         M = 100, pn = 1,
         contrasts = NULL,
         variance = "ISMB",
	 rank = "gehan",
         control = aftgee.control())

Arguments

formula
Aa formula expression, of the form respone ~ predictors. Response can be in class of survival data. See thye documentation of lm, coxph and formula for details.
id
A vector which identifies the clusters. The length of 'id' should be the same as the number of observation.
data
An optional data frame in which to interpret the variables occurring in the formula, along with the id.
subset
An optional vector specifying a subset of observations to be used in the fitting process.
contrasts
an optional list.
binit
A vector of initial estimator; default at linear model.
Sigma
The initial covariance matrix; default at identity matrix.
weight
A weight vector for covariates; default at 1.
variance
A character string specifying the covariance estimating method. The following are permitted: 'MB': multipiler resmapling, 'ZLCF': Zeng and Lin's approach with closed form Si, 'ZLMB': Zeng and Lin's ap
rank
A character string specifying between "gehan" and "logrank" weight.
M
Resampling size. When M = 0, only the beta estimate will be displayed.
pn
Case-cohort size ratio.
control
Controls maxiter, abstol and restol.

Value

  • smoothrr returns an object of class "smoothrr" representing the fit.\ An object of class "smoothrr" is a list containing at elast the following components:
  • betaa vector of beta estimates
  • covmata list of covariance estimates
  • tbetaTiming for beta estimates
  • beta.convAn integer code indicating type of convergence. 0 indicates successful convergence. Error codes are 1 indicates that the iteration limit maxit has been reached; 2 is failure due to stagnation; 3 indicates error in function evaluation; 4 is failure due to exceeding 100 steplength reductions in line-search; and 5 indicates lack of improvement in objective function.

References

Chiou, S. H. and Kang, S. and Yan, J. (2012) Fast Accelerated Failure Time Modeling for Case-Cohort Data. Zeng, D. and Lin, D. Y. (2008) Efficient Resampling Methods for Nonsmooth Estimating Functions. Biostatistics, 9, 355--363 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: Asymptotics and Extensions to Clustered Data. Biometrika, 96, 577 -- 590

Examples

Run this code
#### kidney data
data(kidney)
foo <- smoothrr(Surv(log(time), status) ~ age + sex - 1, id = id, data = kidney, variance = c("js", "ZLCF", "ZLMB", "sHCF", "sHMB", "ISCF", "ISMB"), M = 10)
foo

#### nwtco data
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$edrel = nwtco$edrel / 12
nwtco$study = nwtco$study - 3
nwtco$stage2 = ifelse(nwtco$stage == 2, 1, 0)
nwtco$stage3 = ifelse(nwtco$stage == 3, 1, 0)
nwtco$stage4 = ifelse(nwtco$stage == 4, 1, 0)
nwtco$histol = nwtco$histol - 1
sub <- nwtco[subinx,]
fit <- smoothrr(Surv(edrel, rel) ~ histol + age12 + study - 1, id = seqno, weight = hi, data = sub, M = 7, variance = c("MB", "ISMB"), subset = stage4 == 1)
summary(fit)

Run the code above in your browser using DataLab