This function calls the C++ implementation of Cox regression with elastic net regularization. It handles both right-censored and left-truncated (start, stop) survival data using the Breslow or Efron method for ties. For stratified Cox models, it uses an IRLS approach with integrated C++ gradient/Hessian computation.
coxnet(
x,
is.sparse,
y,
weights,
offset,
alpha,
nobs,
nvars,
jd,
vp,
cl,
ne,
nx,
nlam,
flmin,
ulam,
thresh,
isd,
vnames,
maxit,
pb,
efron = FALSE
)An object of class "coxnet" with components:
NULL (Cox model has no intercept)
Sparse coefficient matrix
Number of nonzero coefficients per lambda
Dimension of coefficient matrix
Lambda sequence used
Fraction of null deviance explained
Null deviance
Number of coordinate descent passes
Error code
Logical indicating if offset was used
Design matrix, of dimension nobs x nvars.
Logical, is x a sparse matrix?
Survival response variable, must be a Surv or stratifySurv object.
Observation weights.
Offset for the linear predictor.
The elastic net mixing parameter.
Number of observations.
Number of variables.
Excluded variable indices (1-indexed, first element is count).
Penalty factors for each coefficient.
Coefficient limits matrix (2 x nvars).
Maximum number of variables in the model.
Maximum number of variables ever to be nonzero.
Number of lambda values.
Minimum lambda ratio.
User-supplied lambda sequence.
Convergence threshold.
Standardize flag.
Variable names.
Maximum number of iterations.
Progress bar object.
Logical; if TRUE use Efron method for ties, otherwise Breslow.