Learn R Programming

aftgee (version 0.3-20)

smoothrr: Smooth Rank Regression

Description

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

Usage

smoothrr(formula, data, subset, contrasts = NULL, id,
         weights = NULL,
	 rankweights = "gehan", binit = "lm", sigmainit = NULL,
         variance = "ISMB", B = 100, gpweight = 1, strataid = NULL,
         iter = TRUE, control = aftgee.control())

Arguments

formula
A formula expression, of the form response ~ predictors. Response can be in class of survival data. See the 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.
strataid
A vector which identifies the strata. This can also be used to distinct case-cohort sampling and stratified sampling.
binit
A vector of initial estimator; default at simple linear regression.
sigmainit
The initial covariance matrix; default at identity matrix.
weights
A weight vector for covariates; default at 1.
variance
A character string specifying the covariance estimating method. The following are permitted: 'MB': multiplier resampling, 'ZLCF': Zeng and Lin's approach with closed form Si, 'ZLMB': Zeng and Lin's ap
rankweights
A character string specifying between "gehan" and "logrank" weight.
B
Resampling size. When M = 0, only the beta estimate will be displayed.
gpweight
Power for general weight function when rankweights = GP
iter
A logical value specifying whether iterative procedure is used for general weights function
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 least 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 step length 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: Asymptotic and Extensions to Clustered Data. Biometrika, 96, 577 -- 590

Examples

Run this code
#### kidney data
library(survival)
data(kidney)
foo <- smoothrr(Surv(time, status) ~ age + sex - 1, id = id, 
                data = kidney, variance = c("MB", "ISMB"), B = 10)
foo

#### 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$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, 
       weights = hi, data = sub, B = 7, variance = c("MB", "ISMB"), 
       subset = stage4 == 1)
summary(fit)

Run the code above in your browser using DataLab