I am using Coxnet package for a dataset of 457 observations and 180 variables and also for another dataset of 457 observations and 25000 variables.
set.seed(1234)
fit <- Coxnet(x,y,penalty="Lasso")
After creating the model I get some values as follows:
The path of lambda:
lambda nzero
1 2.144e-01 0
2 1.776e-01 1
3 1.472e-01 1
4 1.220e-01 6
5 1.011e-01 8
6 8.375e-02 10
7 6.940e-02 15
8 5.751e-02 20
9 4.765e-02 24
10 3.949e-02 23
When I use the arguments, nfolds or foldid I get the values as follows:
The path of lambda:
lambda cvm cvse nzero index
1 2.144e-01 -6.091 0.07814 0
2 1.776e-01 -6.068 0.07709 1
3 1.472e-01 -6.051 0.07197 1
4 1.220e-01 -6.042 0.06801 6
5 1.011e-01 -6.029 0.06566 8
6 8.375e-02 -6.019 0.06492 10
7 6.940e-02 -6.015 0.06522 15
8 5.751e-02 -6.012 0.06557 20
9 4.765e-02 -6.004 0.06490 24
10 3.949e-02 -5.998 0.06486 23 max
11 3.272e-02 -6.003 0.06655 27
12 2.711e-02 -6.020 0.06880 31
I read some papers yet couldn't understand what these lambda and nzero stand for.
1) Does these lambda values stand for penalty scores for each variable and does nzero represents the position of the variables?
2) The fit object has a set of Beta values which have zero and non-zero values in it. Are these similar to the coefficient vector in coxph? What does the zero and non-zero values in Beta signify?
3) Can the non-zero coefficient (Beta) be used as a feature selection method to create a coxph model?