coxtv {surtvep} | R Documentation |
fit a Cox non-proportional hazards model
Description
Fit a Cox non-proportional hazards model via maximum likelihood.
Usage
coxtv(
event,
z,
time,
strata = NULL,
nsplines = 8,
knots = NULL,
degree = 3,
ties = "Breslow",
stop = "ratch",
tol = 1e-06,
iter.max = 20,
method = "ProxN",
gamma = 1e+08,
btr = "dynamic",
tau = 0.5,
parallel = FALSE,
threads = 2L,
fixedstep = FALSE
)
Arguments
event |
failure event response variable of length |
z |
input covariate matrix, with |
time |
observed event times, which should be a vector with non-negative values. |
strata |
a vector of indicators for stratification.
Default = |
nsplines |
number of basis functions in the splines to span the time-varying effects. The default value is 8.
We use the R function |
knots |
the internal knot locations (breakpoints) that define the B-splines.
The number of the internal knots should be |
degree |
degree of the piecewise polynomial for generating the B-spline basis functions—default is 3 for cubic splines.
|
ties |
a character string specifying the method for tie handling. If there are no tied events,
the methods are equivalent.
By default |
stop |
a character string specifying the stopping rule to determine convergence.
|
tol |
tolerance used for stopping the algorithm. See details in |
iter.max |
maximum iteration number if the stopping criterion specified by |
method |
a character string specifying whether to use Newton method or proximal Newton method. If |
gamma |
parameter for proximal Newton method |
btr |
a character string specifying the backtracking line-search approach. |
tau |
a positive scalar used to control the step size inside the backtracking line-search. The default value is 0.5. |
parallel |
if |
threads |
an integer indicating the number of threads to be used for parallel computation. The default value is |
fixedstep |
if |
Details
The model is fit by Newton method (proximal Newton method).
Value
An object with S3 class coxtv
.
call |
the call that produced this object. |
beta |
the estimated time-varying coefficient for each predictor at each unique time.
It is a matrix of dimension |
bases |
the basis matrix used in model fitting. If |
ctrl.pts |
estimated coefficient of the basis matrix of dimension |
Hessian |
the Hessian matrix of the log-partial likelihood, of which the dimension is |
internal.knots |
the internal knot locations (breakpoints) that define the B-splines. |
nobs |
number of observations. |
theta.list |
the history of |
VarianceMatrix |
the variance matrix of the estimated coefficients of the basis matrix, which is the inverse of the negative Hessian matrix. |
References
Boyd, S., and Vandenberghe, L. (2004) Convex optimization.
Cambridge University Press.
Gray, R. J. (1992) Flexible methods for analyzing survival data using splines, with applications to breast cancer prognosis.
Journal of the American Statistical Association, 87(420): 942-951.
Gray, R. J. (1994) Spline-based tests in survival analysis.
Biometrics, 50(3): 640-652.
Luo, L., He, K., Wu, W., and Taylor, J. M. (2023) Using information criteria to select smoothing parameters when analyzing survival data with time-varying coefficient hazard models.
Perperoglou, A., le Cessie, S., and van Houwelingen, H. C. (2006) A fast routine for fitting Cox models with time varying effects of the covariates.
Computer Methods and Programs in Biomedicine, 81(2): 154-161.
Wu, W., Taylor, J. M., Brouwer, A. F., Luo, L., Kang, J., Jiang, H., and He, K. (2022) Scalable proximal methods for cause-specific hazard modeling with time-varying coefficients.
Lifetime Data Analysis, 28(2): 194-218.
See Also
coef
, plot
, and the coxtp
function.
Examples
data(ExampleData)
z <- ExampleData$z
time <- ExampleData$time
event <- ExampleData$event
fit <- coxtv(event = event, z = z, time = time)