楼主: tangerinex
6776 1

[问答] R语言SIS函数求助 [推广有奖]

  • 0关注
  • 0粉丝

大专生

31%

还不是VIP/贵宾

-

威望
0
论坛币
19 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
103 点
帖子
2
精华
0
在线时间
99 小时
注册时间
2020-5-2
最后登录
2021-11-2

楼主
tangerinex 学生认证  发表于 2020-10-5 14:36:26 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请教一个关于使用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

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:R语言 SIS Conservative Convergence coefficient

沙发
monster111 发表于 2022-2-22 10:09:47
您好,您这个问题解决了吗?我现在也遇到了这个问题,不知道如何处理,希望能得到您的帮助!谢谢!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-1 01:00