I'm looking to do a variable selection to find the most associated variables to overall survival (and other criteria) since I have a lot of colinearity in my data set I'm opting for Elastic Net but I don't know how I can find the alpha %in% ] 0, 1 [.

More info:

data <- Data[,16:105] 
surv_obj_os <- Surv(Data$t_start, Data$t_end, Data$status_os)
variables_stand <- scale(data, center = T, scale = T) 
x <- as.matrix(variables_stand) 
modele_final <- glmnet(x = x, y = donnees_survie, alpha = optimal_alpha, family = "cox") 
cv_fit_os <- cv.glmnet(x, surv_obj_os, family = "cox", alpha =1 , trace.it = 1, folds = 5)
lambda_optimal_os <- cv_fit_os$lambda.min
elsatic_model_os1 <- glmnet(x, surv_obj_os, family = "cox", alpha =optimal_alpha, lambda = lambda_optimal_os)
coeff_os_1 <- coef(elsatic_model_os1 )[-1, ]
selected_vars_os_1 <- names(coeff_os_1[which(coeff_os_1 != 0)])

This is what I did so far, but I can't find a way to choose the optimal_alpha.

0

There are 0 best solutions below