tvTran {dynsurv}R Documentation

Fit Time-varying Transformation Model for Right Censored Survival Data

Description

Unlike the time-varying coefficient Cox model, the transformation model fomulates the temporal covariate effects in terms of survival function, i.e.,

S(t|X) = g(\beta_0(t)' X),

where g(z) = exp(- exp(z)). It can be viewed as a functional generalized linear model with response I(T > t), and other transformation function is possible. The time-varying coefficients are solved a set of estimating equations sequentially.

Usage

tvTran(formula, data, control = list())

Arguments

formula

A formula object, with the response on the left of a '~' operator, and the terms on the right. The response must be a survival object as returned by the Surv function.

data

A data.frame in which to interpret the variables named in the formula.

control

List of control options.

Details

Note that because the time-varying coefficient function is connected to the survival function, it has a different interpretation of the time-varying coefficient function in Cox model.

The control argument is a list of components:

resample

A logical value, default TRUE. If TRUE, the model will estimate a 95% confidence band by resampling method.

R

Number of resamplings, default 30.

Value

An object of S3 class tvTran representing the fit.

References

Peng, L. and Huang, Y. (2007). Survival analysis with temporal covariate effects. Biometrika 94(3), 719–733.

See Also

coef.tvTran, plotCoef.

Examples

## Not run: 
## Attach the veteran data from the survival package
mydata <- survival::veteran
mydata$celltype <- relevel(mydata$celltype, ref = "large")
myformula <- Surv(time, status) ~ karno + celltype

## Fit the time-varying transformation model
fit <- tvTran(myformula, mydata, control = list(resample = TRUE, R = 30))

## Plot the time-varying coefficient function between two time points
plotCoef(subset(coef(fit), Time > 15 & Time < 175))

## End(Not run)

[Package dynsurv version 0.4-7 Index]