请教一个关于使用SIS函数对cox模型利用lasso进行变量选择的问题。我的代码如下:
library(SIS)
x=as.matrix(stdat[,22:(dim(stdat)[2]-1)])
y3=Surv(stdat$timegap/30,stdat$death)
model3=SIS(x,y3,family = 'cox',penalty = 'lasso',varISIS = 'cons')
(x是4722*59的矩阵,共有59个变量)
---------------------------------------------------------------------------------------------
下面是运行结果:
Iter 1 , screening: 2 3 4 5 6 7 8 9 10 12 13 14 17 18 19 20 21 22 23 24 25 26 27 28 30 32 33 34 36 44 46 47 49 50 51 53 54 57 58 59
Sample splitting attempt: 1
Iter 1 , screening: 3 4 5 6 7 8 9 10 11 12 13 17 18 19 20 21 22 23 24 25 27 28 30 33 34 36 37 39 40 43 45 46 47 51 53 54 57 58 59
Sample splitting attempt: 2
Iter 1 , screening: 2 3 4 5 7 8 9 10 12 13 14 15 17 18 19 20 21 22 23 24 25 28 30 32 33 34 35 36 39 40 42 43 47 51 52 53 54 57 58
Sample splitting attempt: 3
Iter 1 , screening: 3 4 5 6 7 8 9 10 12 13 15 17 18 19 20 22 23 24 25 27 28 29 30 31 32 33 34 37 46 47 51 52 53 54 55 56 57 58 59
Sample splitting attempt: 4
Iter 1 , screening: 2 3 4 7 8 9 10 12 13 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 38 39 42 44 46 47 51 53 54 55 56 57 58 59
Sample splitting attempt: 5
Iter 1 , screening: 1 2 3 4 6 7 8 9 10 11 12 13 18 19 20 21 22 23 24 25 27 28 30 32 33 34 37 39 42 43 45 46 47 50 51 53 54 57 58
Sample splitting attempt: 6
Iter 1 , screening: 3 4 5 6 7 8 9 10 11 12 13 14 19 20 21 22 23 24 25 28 30 31 32 33 34 37 39 42 43 44 46 47 51 52 53 54 57 58 59
Sample splitting attempt: 7
Iter 1 , screening: 3 6 7 8 9 10 11 12 15 17 18 19 20 21 22 23 24 25 28 29 30 32 33 34 36 37 42 44 46 47 50 52 53 54 55 56 57 58 59
Sample splitting attempt: 8
Iter 1 , screening: 2 3 4 5 7 8 9 10 11 12 13 14 17 18 19 20 22 23 24 25 28 29 30 32 33 34 46 47 49 50 51 52 53 54 55 56 57 58 59
Sample splitting attempt: 9
Iter 1 , screening: 2 3 4 5 6 7 8 9 10 12 13 15 17 18 19 20 21 22 23 24 25 26 28 30 33 34 36 40 41 42 45 46 47 50 51 53 54 57 58
Sample splitting attempt: 10
Iter 1 , screening: 2 3 4 5 6 7 8 9 10 11 12 13 17 18 19 20 22 23 24 25 27 28 29 30 32 33 34 44 46 47 49 50 51 53 54 55 56 57 58
Sample splitting attempt: 11
Iter 1 , screening: 3 4 6 7 8 9 10 12 13 14 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 37 39 42 46 49 50 53 54 55 56 57 58
Sample splitting attempt: 12
Iter 1 , screening: 1 2 3 4 6 7 8 9 10 11 12 13 14 18 19 20 22 23 24 25 27 28 30 31 32 33 34 37 38 39 43 46 47 49 51 52 53 54 57 58
Sample splitting attempt: 13
Iter 1 , screening: 2 3 4 6 7 8 9 10 12 13 17 18 19 20 21 22 23 24 25 28 29 30 31 32 33 34 42 44 45 46 50 51 53 54 55 56 57 58 59
Sample splitting attempt: 14
Iter 1 , screening: 2 3 4 5 6 7 8 9 10 12 13 17 18 19 20 21 22 23 24 25 28 29 30 31 32 33 34 38 42 44 47 50 53 54 55 56 57 58 59
Sample splitting attempt: 15
Iter 1 , screening: 3 4 6 7 8 9 10 12 13 14 17 18 19 20 21 22 23 24 25 27 28 29 30 32 33 34 37 39 42 46 47 50 51 53 54 55 56 57 58
Sample splitting attempt: 16
Iter 1 , screening: 3 4 6 7 8 9 10 11 12 13 14 19 20 21 22 23 24 25 27 28 29 30 32 33 34 36 37 38 39 42 44 45 47 51 53 54 55 56 57 58
Sample splitting attempt: 17
Iter 1 , screening: 2 3 4 5 6 7 8 9 10 12 13 14 18 19 20 21 22 23 24 25 28 30 31 32 33 35 36 39 40 42 43 44 46 47 50 53 54 57 58 59
Sample splitting attempt: 18
Iter 1 , screening: 3 4 6 7 8 9 10 11 12 15 17 18 19 20 22 23 24 25 27 28 29 30 33 34 37 38 42 44 45 47 49 51 52 53 54 55 56 57 58
Sample splitting attempt: 19
Iter 1 , screening: 2 3 4 5 7 8 9 10 12 13 17 18 19 20 21 22 23 24 25 27 28 29 30 31 33 34 37 42 45 46 50 51 52 53 54 55 56 57 58 59
Sample splitting attempt: 20
No variables remaining after 20 sample splitting attempts!
You can try a more conservative variable screening approach!
Iter 1 , selection:
Iter 1 , conditional-screening: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Iter 2 , screening: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Sample splitting attempt: 21
No variables remaining after 21 sample splitting attempts!
You can try a more conservative variable screening approach!
Iter 2 , selection:
Model already selected
There were 24 warnings (use warnings() to see them)
我使用了varISIS = 'cons',但是最终结果还是没有选择出来变量。请问这是哪一方面出现了问题?是数据的问题吗?我该如何解决?毕业论文要用,非常着急,希望能得到解答,不胜感激!!!!
警告信息如下:
> warnings()
警告信息:
1: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
2: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
3: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
4: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
5: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
6: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
7: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
8: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
9: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
10: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
11: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
12: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
13: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
14: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
15: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
16: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
17: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
18: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
19: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
20: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned
21: In fitter(X, Y, istrat, offset, init, control, weights = weights, ... :
Loglik converged before variable 1 ; coefficient may be infinite.
22: In fitter(X, Y, istrat, offset, init, control, weights = weights, ... :
Loglik converged before variable 1 ; coefficient may be infinite.
23: In fitter(X, Y, istrat, offset, init, control, weights = weights, ... :
Loglik converged before variable 1 ; coefficient may be infinite.
24: from glmnet Fortran code (error code -2); Convergence for 2th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned