smoothSurvReg {smoothSurv}R Documentation

Regression for a Survival Model with Smoothed Error Distribution

Description

Regression for a survival model. These are all time-transformed location models, with the most useful case being the accelerated failure models that use a log transformation. Error distribution is assumed to be a mixture of G-splines. Parameters are estimated by the penalized maximum likelihood method.

Usage

smoothSurvReg(formula = formula(data), data = parent.frame(), subset, na.action,
   init.beta = NULL, init.scale = NULL, init.c = NULL, init.dist = "best",
   update.init = TRUE, aic = TRUE, lambda = exp(2:(-9)),
   model = FALSE, control = smoothSurvReg.control(), ...)

Arguments

formula A formula expression as for other regression models. See the documentation for lm and formula for details. Use Surv on the left hand side of the formula.
data Optional data frame in which to interpret the variables occurring in the formula.
subset Subset of the observations to be used in the fit.
na.action Function to be used to handle any NAs in the data.
init.beta Optional vector of the initial values of the regression parameter beta (intercept and regression itself).
init.scale Optional value of the initial value of the scale parameter sigma.
init.c Optional vector of the initial values for the G-spline coefficients c, all values must lie between 0 and 1 and must sum up to 1.
init.dist A character string specifying the distribution used by survreg to find the initial values for parameters (if not given by the user). It is assumed to name "best" or an element from survreg.distributions. These include "weibull", "exponential", "gaussian", "logistic", "lognormal" and "loglogistic". If "best" is specified one of "lognormal", "weibull" and "loglogistic" giving the highest likelihood is used.
update.init If TRUE, the initial values are updated during the grid search for the lambda parameter giving the optimal AIC. Otherwise, fits with all lambdas during the grid search start with same initials determine at the beginning either from the values of init.beta, init.scale, init.c or from the initial survreg fit as determined by the parameter init.dist.
aic If TRUE the optimal value of the tuning parameter lambda is determined via a grid search through the values specified by the parameter lambda. If FALSE, only the model with lambda = lambda[1] is fitted.
lambda A grid of values of the tuning parameter lambda searched for the optimal value if aic = TRUE.
model If TRUE, the model frame is returned.
control A list of control values, in the format producted by smoothSurvReg.control.
... Other arguments which will be passed to smoothSurvReg.control. See its help page for more options to control the fit and for the possibility to fix some values and not to estimate them.

Details

Read the paper paper.pdf found in /inst/doc directory of this library.

There is a slight difference in the definition of the penalty used by the R function compared to what is written in the paper. The penalized log-likelihood given in the paper has a form

l_P(theta) = l(theta) - (lambda/2) * sum[j in (m+1):g] (Delta^m a[j])^2,

while the penalized log-likelihood used in the R function multiplies the tuning parameter lambda given by lambda by a sample size n to keep default values more or less useful for samples of different sizes. So that the penalized log-likelihood which is maximized by the R function has the form

l_P(theta) = l(theta) - ((lambda*n)/2) * sum[j in (m+1):g] (Delta^m a[j])^2.

Value

An object of class smoothSurvReg is returned. See smoothSurvReg.object for details.

Author(s)

Arnost Komarek arnost.komarek@med.kuleuven.ac.be

References

Komarek, A., Lesaffre, E., and Hilton, J. F. (2004) Accelerated Failure Time Model for Arbitrarily censored Data with Smoothed Error Distribution. ?????, ??, ???–???.

Examples

### We generate interval censored data and fit a model with few artificial covariates
x1 <- rbinom(50, 1, 0.4)                                         ## binary covariate
x2 <- rnorm(50, 180, 10)                                         ## continuous covariate
y1 <- 0.5*x1 - 0.01*x2 + 0.005 *x1*x2 + 1.5*rnorm(50, 0, 1)      ## generate log(T), left limit
t1 <- exp(y1)                                                    ## left limit of the survival time
t2 <- t1 + rgamma(50, 1, 1)                                      ## right limit of the survival time
surv <- Surv(t1, t2, type = "interval2")                         ## survival object

## Fit the model with an interaction
fit1 <- smoothSurvReg(surv ~ x1 * x2, info = FALSE, lambda = exp(2:(-1)))

## Print the summary information
summary(fit1, spline = TRUE)

## Plot the fitted error distribution
plot(fit1)

## Plot the fitted error distribution with its components
plot(fit1, components = TRUE)

## Plot the cumulative distribution function corresponding to the error density
survfit(fit1, cdf = TRUE)

## Plot survivor curves for persons with (x1, x2) = (0, 180) and (1, 180)
survfit(fit1, matrix(c(0, 1, 180, 180, 0, 180), ncol = 3))

## More involved examples can be found in script files
## used to perform analyses  and draw pictures 
## presented in /inst/doc/paper.pdf of this library.
## These script files together with data for Signal Tandmobiel
## example (section 6.1 of paper.pdf) can be obtained from
## arnost.komarek@med.kuleuven.ac.be

[Package Contents]