X: Numeric matrix or data.frame. Explanatory variables. Qualitative variables must be transform into binary variables.
Y: Numeric matrix or data.frame. Response variables. Object must have two columns named as "time" and "event". For event column, accepted values are: 0/1 or FALSE/TRUE for censored and event observations.
EN.alpha: Numeric. Elastic net mixing parameter. If EN.alpha = 1 is the lasso penalty, and EN.alpha = 0 the ridge penalty (default: 0.5). NOTE: When ridge penalty is used, EVP and max.variables will not be used.
max.variables: Numeric. Maximum number of variables you want to keep in the cox model. If NULL, the number of columns of X matrix is selected. When MIN_EPV is not meet, the value will be change automatically (default: NULL).
x.center: Logical. If x.center = TRUE, X matrix is centered to zero means (default: TRUE).
x.scale: Logical. If x.scale = TRUE, X matrix is scaled to unit variances (default: FALSE).
remove_near_zero_variance: Logical. If remove_near_zero_variance = TRUE, near zero variance variables will be removed (default: TRUE).
remove_zero_variance: Logical. If remove_zero_variance = TRUE, zero variance variables will be removed (default: TRUE).
toKeep.zv: Character vector. Name of variables in X to not be deleted by (near) zero variance filtering (default: NULL).
remove_non_significant: Logical. If remove_non_significant = TRUE, non-significant variables/components in final cox model will be removed until all variables are significant by forward selection (default: FALSE).
alpha: Numeric. Numerical values are regarded as significant if they fall below the threshold (default: 0.05).
MIN_EPV: Numeric. Minimum number of Events Per Variable (EPV) you want reach for the final cox model. Used to restrict the number of variables/components can be computed in final cox models. If the minimum is not meet, the model cannot be computed (default: 5).
returnData: Logical. Return original and normalized X and Y matrices (default: TRUE).
verbose: Logical. If verbose = TRUE, extra messages could be displayed (default: FALSE).
Returns
Instance of class "Coxmos" and model "coxEN". The class contains the following elements: X: List of normalized X data information.
(data): normalized X matrix
(x.mean): mean values for X matrix
(x.sd): standard deviation for X matrix
Y: List of normalized Y data information.
(data): normalized X matrix
(y.mean): mean values for Y matrix
(y.sd): standard deviation for Y matrix'
survival_model: List of survival model information.
fit: coxph object.
AIC: AIC of cox model.
BIC: BIC of cox model.
lp: linear predictors for train data.
coef: Coefficients for cox model.
YChapeau: Y Chapeau residuals.
Yresidus: Y residuals.
opt.lambda: Optimal lambda computed by the model with maximum % Var from glmnet function.
EN.alpha: EN.alpha selected
n.var: Number of variables selected
call: call function
X_input: X input matrix
Y_input: Y input matrix
convergence_issue: If any convergence issue has been found.
alpha: alpha value selected
selected_variables_cox: Variables selected to enter the cox model.
nsv: Variables removed by cox alpha cutoff.
removed_variables_correlation: Variables removed by being high correlated with other variables.
nzv: Variables removed by remove_near_zero_variance or remove_zero_variance.
nz_coeffvar: Variables removed by coefficient variation near zero.
class: Model class.
time: time consumed for running the cox analysis.
Details
The coxEN function is designed to handle survival data using the elastic net regularization. The function is particularly useful when dealing with high-dimensional datasets where the number of predictors exceeds the number of observations. The elastic net regularization combines the strengths of both lasso and ridge regression. The EN.alpha parameter controls the balance between lasso and ridge penalties. It's important to note that when using the ridge penalty (EN.alpha = 0), the EVP and max.variables parameters will not be considered.