Getting started with selSurv

selSurv separates Cox-Lasso fitting from the inferential question asked after selection. The main user-facing functions correspond to different inferential targets rather than interchangeable ways to compute the same confidence interval.

A common Cox-Lasso fit

The following small example is used only to illustrate the interface.

set.seed(2026)
n <- 120
p <- 6
X <- matrix(rnorm(n * p), nrow = n, ncol = p)
colnames(X) <- paste0("x", seq_len(p))
beta <- c(0.8, -0.6, 0.4, 0, 0, 0)
T <- rexp(n, rate = 0.06 * exp(drop(X %*% beta)))
C <- rexp(n, rate = 0.04)
time <- pmin(T, C)
status <- as.integer(T <= C)
library(selSurv)
fit <- coxlasso_fit(X, time, status, lambda_choice = "1se")
fit
#> $X
#>                  x1           x2           x3          x4          x5
#>   [1,]  0.520589073  1.906204189  0.263244987  1.12186282  0.64220857
#>   [2,] -1.079690762  2.131797718  0.110421189 -2.10066370  1.15655108
#>   [3,]  0.139238115  0.231456363  1.195763621 -2.09087186 -0.17357348
#>   [4,] -0.084748785  0.896945738  0.733309514 -1.29110001 -0.96456910
#>   [5,] -0.666639615 -1.738792712 -0.004511692  1.07199152  1.85379902
#>   [6,] -2.516089032  0.468847940 -0.021215500  0.89487015  1.68436511
#>   [7,] -0.735146797 -0.544147673  0.138501733 -0.84263230  1.05731214
#>   [8,] -1.020122263 -0.165414154 -1.070127070  0.04629749  0.81456163
#>   [9,]  0.113554441  0.552166563  1.236062067  0.62336815 -1.19459693
#>  [10,] -0.473790982  1.033330212 -0.539810095  0.48509195 -2.02885659
#>  [11,] -0.408214704 -0.046178805 -0.296228915  0.53194447  2.12408654
#>  [12,] -0.730433279  2.638707313  0.688218803  0.19742268  0.29921906
#>  [13,] -0.221436599  0.589005749 -0.399007304  0.32656678 -0.82464305
#>  [14,] -0.225816524 -0.202377334 -0.103484853 -1.44023199  1.52434568
#>  [15,] -2.546881446  0.441560138  1.529534041  2.11470908 -0.61482041
#>  [16,]  1.347001499 -0.100257702 -0.634636458 -0.18467231 -0.45976066
#>  [17,]  0.616408146 -1.093403992 -0.226854589  0.49210433  0.44364099
#>  [18,]  0.217564338  0.503247339  1.501084093 -1.36132699 -1.39598147
#>  [19,] -0.804718830  0.949240091 -0.342463482 -0.36521756 -0.50247786
#>  [20,]  0.689746778  0.382802056 -0.553727556  0.75612656 -1.06059878
#>  [21,] -0.328672014  0.371578211  0.257626871  0.14650281  1.17460716
#>  [22,] -0.164681577  0.157216402  0.613121759  0.26194725  0.33037146
#>  [23,] -1.392028880  0.847939890 -0.652287367 -1.30615904 -0.28843322
#>  [24,]  1.465824761 -1.283392657 -0.138281029  0.49216403  1.32156210
#>  [25,]  0.048206808  1.158278608 -0.123638002 -0.51110400 -0.04547403
#>  [26,]  1.908083835 -0.909106213 -0.964705216 -1.66057454 -0.21479390
#>  [27,]  1.730944527  0.334990705  0.019043184  0.62237637  0.13480451
#>  [28,]  0.058145837  0.775854082  1.691692353  0.01573101 -0.64499750
#>  [29,]  0.645328162  0.237140152  0.885809071 -0.73388713  0.05707192
#>  [30,]  1.725628987 -1.559870135 -0.729930145  0.27521114  0.93118467
#>  [31,] -0.528966917  0.024326751  0.351884683 -1.85873859  0.20366345
#>  [32,]  0.166392026  0.334635189 -0.247330893  2.07889037  1.62579612
#>  [33,] -0.254723575  0.989410999 -0.163591832 -2.36088033 -0.59335596
#>  [34,]  0.332782359  0.500375114  0.872360560  0.32713540 -0.30856908
#>  [35,]  0.182432813  0.576907865  0.605938214 -0.22752273  1.33644833
#>  [36,]  1.164593750  1.142690940  0.927240813 -1.18059531 -1.20646409
#>  [37,]  0.593492851 -0.707447814  0.458044437  0.33042153 -1.40888181
#>  [38,] -0.891779729 -0.618559641 -0.801114024 -0.40693478  0.64442462
#>  [39,]  0.577253310 -0.008314196 -0.497123153  1.52522324 -0.40886743
#>  [40,] -0.824905581  0.338919734 -1.212967815 -1.10318387 -0.97923637
#>  [41,] -1.157253858  1.405406299  0.619712599  1.33689257 -0.92723122
#>  [42,]  0.777998774 -0.865269852  1.359663258  0.55271040  0.79270412
#>  [43,] -1.204221786 -0.873953957 -1.621064763 -1.05652642 -0.68909904
#>  [44,]  0.306714102  0.774318201  0.079559499 -0.19018299 -0.04165164
#>  [45,] -0.833658541 -0.401890242  0.512593137 -0.90922418 -0.78561878
#>  [46,]  1.418141164 -0.215137831 -0.219101938 -2.00091551  0.43445546
#>  [47,]  0.711786118  0.605256131 -0.825938695  1.90897087 -0.66556690
#>  [48,] -0.402497723 -0.614567684 -1.013578244  1.56898021  0.44993613
#>  [49,]  0.799362219 -0.724422931  1.282066246  0.14030123 -0.54804046
#>  [50,]  0.426484436 -0.256942637 -0.212144499 -1.42055946  1.85693691
#>  [51,] -1.169898670 -0.392072736  1.184877237  0.51306680  0.40207812
#>  [52,] -0.206200160 -0.686701962 -0.650612437 -0.98746120 -1.86460319
#>  [53,] -0.930610309  0.875840340  1.287367270  0.59722392  1.37493052
#>  [54,]  0.449397566 -0.481057986  0.538933216  0.86786040 -0.07460351
#>  [55,] -0.644806455  0.068357591  0.025540554  0.18925776  0.22779390
#>  [56,] -0.231422690  0.137024893  1.163947533 -0.06930641  1.38865619
#>  [57,] -1.236368011 -1.858768519 -0.367625732  1.07625934  0.40582213
#>  [58,] -0.960955298  0.346276571 -0.363369570  1.07089132  2.56136760
#>  [59,]  0.133956282  1.501633820 -0.006753365  0.42163338 -0.52633457
#>  [60,] -0.999052723 -0.013738120 -0.100472499 -0.12454978  0.35240739
#>  [61,] -0.141470691 -0.775245198 -0.148592078  0.93719207  0.47516114
#>  [62,]  0.167329900  1.311158136 -0.182952755  0.20061913  0.79190511
#>  [63,] -0.198788613  0.260524557 -0.858147838  1.44817884  0.83127103
#>  [64,] -0.291207188  1.014017008  0.958159182 -1.28218257  0.54869793
#>  [65,] -1.734397034  0.215594208 -0.839076942 -0.08455421 -1.24227498
#>  [66,] -0.272728332  0.613404626 -0.759724279  1.10161395 -0.41337033
#>  [67,] -1.799929482  1.445988481 -0.866514820 -0.69069958  0.07103869
#>  [68,]  1.152740977  0.658085901  1.659025669 -1.72541539 -0.49427182
#>  [69,] -1.003319486  0.375234496  0.556942277  0.56588569  0.32214327
#>  [70,]  0.148210044 -0.674688276  0.601386130 -0.59615842 -0.79642913
#>  [71,]  0.519496681  0.580480573 -1.969786821 -0.48934502  0.90711628
#>  [72,]  0.005436294 -0.414229332 -0.380107749  0.76889336  0.20753915
#>  [73,]  1.347020835  2.180503985  1.157773544  2.11461189  0.54784241
#>  [74,] -0.847033417  0.342857644  1.389634654  0.04478098 -0.22169528
#>  [75,]  0.443398017 -0.798024662 -2.011508425  0.94724107 -0.68179718
#>  [76,] -0.977149468  1.641036166 -2.336308500 -2.12450871  1.45985707
#>  [77,]  2.124491136 -0.460005112 -1.368459770  0.09042833 -0.86250789
#>  [78,]  0.687698961 -1.586470989 -1.373094260 -1.73914879 -0.80038386
#>  [79,] -0.343368220 -1.044915674  0.737388550 -1.70228833 -0.68514197
#>  [80,]  0.785169473  0.041653666  0.454709342  1.40829640  1.82132263
#>  [81,] -1.155577461 -0.432026377  1.776681328  0.69816811 -0.10474422
#>  [82,]  1.508916346  0.458591148  0.194985588  0.57608544  1.11147453
#>  [83,] -1.155496160 -0.229351986 -0.344612622 -0.53433606 -1.02752209
#>  [84,] -1.556811810 -1.856962210  1.612676635 -1.28198635 -0.42412358
#>  [85,] -0.055247925 -0.289674173  0.775709364  0.42961422 -0.15914942
#>  [86,]  0.849193163  1.767141238  0.704279126 -1.12943768  0.65817084
#>  [87,] -0.011096723 -0.442682897  1.072154216  2.41976368 -0.30346456
#>  [88,] -0.760313832 -0.588864402 -0.214130770  0.07827610  0.69656280
#>  [89,]  1.175799252 -0.120588258  0.363631064  0.31622523  0.11277226
#>  [90,]  2.414449709  1.653061282  1.083563787 -1.57940021  0.18025656
#>  [91,] -1.958512768 -0.871354569 -1.952276157  0.51890562  2.12120443
#>  [92,]  1.473589893  0.780668271  0.015510179  1.13539238 -0.67724516
#>  [93,] -0.474883961 -0.613877869 -0.870980920  0.31240446  0.97527964
#>  [94,]  0.981170984 -0.327591311 -0.900934215  0.05554413  1.09733862
#>  [95,] -1.824355220 -0.355216016 -0.776112068  1.56545282  1.66738580
#>  [96,] -0.260610817  0.780934074  0.361430751  0.71883077  0.32411985
#>  [97,] -0.958845313  0.608670172 -0.017349312  0.63432571  0.25078495
#>  [98,] -0.490295710  1.076179017 -1.118195360  1.06590669  0.15330914
#>  [99,] -1.077296714  1.065557652  0.586691375  0.34188855  0.71522931
#> [100,]  0.369425911  2.161646413  0.486195010  3.14336714  0.61054162
#> [101,]  1.216266481  0.070456482  0.473894456  0.34995083 -0.28181689
#> [102,] -0.493843236 -2.535225220  0.361427453  1.07333545  0.88599813
#> [103,] -0.227784721 -0.541334145  1.217683644  0.91643787  0.59412693
#> [104,] -1.111648887 -0.775939574 -0.673116960  0.71765690  0.70011828
#> [105,]  0.995833089 -0.295955418 -0.598848242  1.05548503  2.81491280
#> [106,]  0.561828891  1.151372905  0.735873147  0.35059220  0.27707810
#> [107,] -1.564278557 -0.568887868  0.601739651 -1.93603848 -0.51374124
#> [108,]  1.481077019 -0.805786340  1.108891940 -0.80074194  0.42221415
#> [109,] -1.169205150  0.492593862 -0.011390598  2.34293958 -0.26556434
#> [110,] -1.052013537  0.700758337  0.605035961  1.92087839 -0.77035422
#> [111,] -1.471845525 -0.243125292  1.123528153 -0.10953864 -0.37650065
#> [112,] -1.193436921  0.412481177 -0.705362054 -2.51282079  0.11022293
#> [113,] -0.347979425  0.498165309  1.762472072 -0.75962363  0.97256143
#> [114,]  0.532822543  0.367679115 -0.730020695 -1.50546286  0.35699402
#> [115,] -0.710988576 -0.570602869 -1.634157627 -1.67824571 -0.82416732
#> [116,] -0.198989138  0.738816518 -0.123993780  0.95009863 -0.15563068
#> [117,] -0.281373324 -2.268291326  0.204139470  0.12495359 -1.52971660
#> [118,]  1.170926275  0.614041040 -0.683239219  1.43839197 -0.20222751
#> [119,]  2.288733186  0.403635806 -1.016362272 -1.32535122 -1.31151723
#> [120,] -1.068856614  2.051579327 -0.671434166 -1.00393459 -1.39007894
#>                  x6
#>   [1,]  0.962138142
#>   [2,] -0.178134779
#>   [3,]  0.003289601
#>   [4,]  0.511615166
#>   [5,] -0.456060688
#>   [6,] -0.210904119
#>   [7,] -0.572554869
#>   [8,] -0.353336223
#>   [9,] -1.049656024
#>  [10,]  0.788385521
#>  [11,]  0.619231580
#>  [12,] -0.785768492
#>  [13,]  1.781604052
#>  [14,] -0.249928557
#>  [15,] -0.301097397
#>  [16,] -1.499332110
#>  [17,]  0.034205348
#>  [18,] -0.911047222
#>  [19,]  0.351385587
#>  [20,]  0.195414362
#>  [21,]  0.859629927
#>  [22,] -0.674155139
#>  [23,] -1.662585651
#>  [24,]  0.390045781
#>  [25,]  0.441365682
#>  [26,]  1.283965924
#>  [27,] -0.163185802
#>  [28,]  0.499569043
#>  [29,]  0.460144067
#>  [30,] -0.476282040
#>  [31,] -1.556642390
#>  [32,] -0.689022539
#>  [33,]  0.148407389
#>  [34,]  0.135429491
#>  [35,] -1.372341840
#>  [36,] -0.093103677
#>  [37,] -1.118207934
#>  [38,]  0.744827358
#>  [39,]  0.077682586
#>  [40,] -0.499928792
#>  [41,]  0.611743479
#>  [42,] -0.869034776
#>  [43,]  1.166157990
#>  [44,] -0.769731639
#>  [45,] -1.807244367
#>  [46,] -0.917465741
#>  [47,] -0.356456665
#>  [48,] -0.176553707
#>  [49,] -0.799311276
#>  [50,] -0.392796426
#>  [51,]  0.273725082
#>  [52,]  0.258141983
#>  [53,]  0.110412064
#>  [54,] -0.915161123
#>  [55,]  0.212936650
#>  [56,]  1.403335341
#>  [57,] -0.808434809
#>  [58,]  1.919533562
#>  [59,]  0.865668884
#>  [60,] -1.263907721
#>  [61,] -0.956625877
#>  [62,] -0.303370061
#>  [63,] -0.002203605
#>  [64,] -0.913071355
#>  [65,] -0.649643176
#>  [66,]  0.376311078
#>  [67,]  0.277996383
#>  [68,] -0.754720890
#>  [69,] -0.473084718
#>  [70,] -0.913950427
#>  [71,] -2.603299709
#>  [72,] -0.593467498
#>  [73,] -0.638979895
#>  [74,] -0.105916956
#>  [75,] -0.980291155
#>  [76,]  0.476235460
#>  [77,] -1.412391284
#>  [78,]  1.631003152
#>  [79,] -1.127985882
#>  [80,]  0.438451090
#>  [81,]  1.900650234
#>  [82,] -0.700760424
#>  [83,] -0.371739384
#>  [84,] -0.678503248
#>  [85,]  0.101451284
#>  [86,]  0.553279834
#>  [87,] -1.522220996
#>  [88,] -1.021549302
#>  [89,] -1.390682138
#>  [90,]  0.433339796
#>  [91,]  0.369698592
#>  [92,] -0.709493646
#>  [93,] -1.018949403
#>  [94,] -1.640746253
#>  [95,]  0.682710512
#>  [96,] -0.751876714
#>  [97,]  0.716236912
#>  [98,]  1.995001408
#>  [99,]  1.346136378
#> [100,] -0.826907119
#> [101,]  1.138465168
#> [102,] -0.670743489
#> [103,]  0.288305337
#> [104,]  0.163840250
#> [105,]  0.543705814
#> [106,]  0.008960783
#> [107,]  0.291439729
#> [108,]  0.632100223
#> [109,] -2.122294725
#> [110,] -0.273116169
#> [111,]  0.379269651
#> [112,]  0.207411583
#> [113,]  0.130075483
#> [114,]  1.729015230
#> [115,] -0.131777384
#> [116,]  0.090180039
#> [117,] -0.122655945
#> [118,]  2.347985972
#> [119,] -0.622362195
#> [120,]  1.096080130
#> 
#> $time
#>   [1]  4.936751609  5.516385077 13.385710381 15.635809367 23.452096062
#>   [6]  2.822469105  8.546377707 34.279468166  9.812183178  8.391416362
#>  [11]  4.849622696 19.359421054 18.405488388 11.781124151 24.293544655
#>  [16]  3.125722768  0.491530236 23.099733422 52.797889809  3.624531790
#>  [21]  0.879900517  0.830538757  7.084386723  1.249764450  5.873960717
#>  [26]  3.216452355  1.725259391  1.108818272  0.584268995  3.677324674
#>  [31] 17.710100166 29.038253358 10.098133875  1.568787663  0.716951222
#>  [36]  5.626208754  0.019957142 47.880577976  8.741046288 22.428305176
#>  [41] 14.980036759  1.373946502 67.329386802  1.326827714 34.128322544
#>  [46]  0.150728389  3.123093214  3.665713681  1.709637303  9.435513135
#>  [51]  9.245330852 17.605376583  2.574465163 15.306641895  6.829018646
#>  [56]  7.785840367  9.031298139  3.008732470 10.652280040  0.573365623
#>  [61] 11.019062489  4.863416229  4.352653929 16.457719775 14.792467724
#>  [66] 59.853267065 15.689490864  4.886552042 12.666771142  6.404760212
#>  [71]  0.538400725 27.022404821 10.154293794 15.973802916  0.009122426
#>  [76] 49.424027823 12.204867336  0.062702229  4.926715956  4.434407367
#>  [81]  8.939466241  1.040075880 13.266593521  1.604360578 24.775995546
#>  [86]  5.439994918 16.038272860 17.768320240  0.196885595  2.339793322
#>  [91] 12.394830222 24.303424656 21.232719811 13.638228065 16.677692172
#>  [96] 13.146576844  0.722168596 18.827794723 70.815290681  6.928499298
#> [101]  7.287743999  0.187341362  2.453581957  2.570306301 33.648896161
#> [106]  4.066202230 20.627933445  2.294389278 16.525187821  1.807963944
#> [111]  2.415036690 41.278396568 10.817429334  4.763817242 16.436503765
#> [116]  6.883017882  2.132509086  1.435819652  8.411551795 32.766008036
#> 
#> $status
#>   [1] 1 0 1 1 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 0 0
#>  [38] 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 1
#>  [75] 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 1 1
#> [112] 0 1 0 1 0 1 0 1 1
#> 
#> $y
#>   [1]  4.936751609   5.516385077+ 13.385710381  15.635809367  23.452096062+
#>   [6]  2.822469105+  8.546377707+ 34.279468166+  9.812183178+  8.391416362 
#>  [11]  4.849622696  19.359421054+ 18.405488388+ 11.781124151  24.293544655+
#>  [16]  3.125722768   0.491530236  23.099733422+ 52.797889809+  3.624531790 
#>  [21]  0.879900517+  0.830538757+  7.084386723+  1.249764450   5.873960717 
#>  [26]  3.216452355   1.725259391   1.108818272+  0.584268995   3.677324674 
#>  [31] 17.710100166+ 29.038253358  10.098133875   1.568787663   0.716951222+
#>  [36]  5.626208754+  0.019957142+ 47.880577976   8.741046288+ 22.428305176+
#>  [41] 14.980036759   1.373946502  67.329386802   1.326827714  34.128322544+
#>  [46]  0.150728389+  3.123093214   3.665713681   1.709637303   9.435513135 
#>  [51]  9.245330852+ 17.605376583   2.574465163+ 15.306641895   6.829018646 
#>  [56]  7.785840367+  9.031298139   3.008732470  10.652280040+  0.573365623+
#>  [61] 11.019062489   4.863416229+  4.352653929  16.457719775+ 14.792467724+
#>  [66] 59.853267065  15.689490864+  4.886552042  12.666771142+  6.404760212+
#>  [71]  0.538400725+ 27.022404821+ 10.154293794  15.973802916   0.009122426 
#>  [76] 49.424027823+ 12.204867336   0.062702229   4.926715956   4.434407367 
#>  [81]  8.939466241+  1.040075880  13.266593521+  1.604360578+ 24.775995546+
#>  [86]  5.439994918  16.038272860  17.768320240+  0.196885595   2.339793322 
#>  [91] 12.394830222  24.303424656  21.232719811+ 13.638228065  16.677692172+
#>  [96] 13.146576844+  0.722168596+ 18.827794723+ 70.815290681+  6.928499298+
#> [101]  7.287743999   0.187341362   2.453581957+  2.570306301+ 33.648896161 
#> [106]  4.066202230  20.627933445+  2.294389278  16.525187821+  1.807963944 
#> [111]  2.415036690  41.278396568+ 10.817429334   4.763817242+ 16.436503765 
#> [116]  6.883017882+  2.132509086   1.435819652+  8.411551795  32.766008036 
#> 
#> $cvfit
#> 
#> Call:  (function (x, y, weights = NULL, offset = NULL, lambda = NULL,      type.measure = c("default", "mse", "deviance", "class", "auc",          "mae", "C"), nfolds = 10, foldid = NULL, alignment = c("lambda",          "fraction"), grouped = TRUE, keep = FALSE, parallel = FALSE,      gamma = c(0, 0.25, 0.5, 0.75, 1), relax = FALSE, trace.it = 0,      ...)  {     type.measure = match.arg(type.measure)     alignment = match.arg(alignment)     if (!is.null(lambda) && length(lambda) < 2)          stop("Need more than one value of lambda for cv.glmnet")     if (!is.null(lambda) && alignment == "fraction") {         warning("fraction of path alignment not available if lambda given as argument; switched to alignment=`lambda`")         alignment = "lambda"     }     N = nrow(x)     if (is.null(weights))          weights = rep(1, N)     else weights = as.double(weights)     y = drop(y)     cv.call = glmnet.call = match.call(expand.dots = TRUE)     which = match(c("type.measure", "nfolds", "foldid", "grouped",          "keep"), names(glmnet.call), FALSE)     if (any(which))          glmnet.call = glmnet.call[-which]     glmnet.call[[1]] = as.name("glmnet")     if (glmnet.control()$itrace)          trace.it = 1     else {         if (trace.it) {             glmnet.control(itrace = 1)             on.exit(glmnet.control(itrace = 0))         }     }     if (is.null(foldid))          foldid = sample(rep(seq(nfolds), length = N))     else nfolds = max(foldid)     if (nfolds < 3)          stop("nfolds must be bigger than 3; nfolds=10 recommended")     if (relax)          cv.relaxed.raw(x, y, weights, offset, lambda, type.measure,              nfolds, foldid, alignment, grouped, keep, parallel,              trace.it, glmnet.call, cv.call, gamma, ...)     else cv.glmnet.raw(x, y, weights, offset, lambda, type.measure,          nfolds, foldid, alignment, grouped, keep, parallel, trace.it,          glmnet.call, cv.call, ...) })(x = structure(c(0.520589072918523, -1.07969076235228, 0.139238115019273,  -0.0847487849485765, -0.666639615284596, -2.51608903200946, -0.735146797456677,  -1.02012226313509, 0.113554441297307, -0.473790981840095, -0.408214704337928,  -0.730433278593614, -0.221436599406174, -0.225816524428951, -2.5468814461283,  1.34700149929703, 0.616408145849969, 0.217564338307888, -0.804718830400263,  0.68974677762582, -0.32867201409024, -0.16468157692584, -1.3920288797713,  1.46582476120139, 0.0482068082254438, 1.90808383464199, 1.73094452723732,  0.0581458372592962, 0.645328161775171, 1.7256289865063, -0.528966917456246,  0.166392025612551, -0.254723574763946, 0.332782359437909, 0.182432812827635,  1.164593749518, 0.593492850727868, -0.891779729217369, 0.577253310357403,  -0.824905581058043, -1.15725385762344, 0.777998774006214, -1.20422178597307,  0.30671410214768, -0.833658540642056, 1.41814116350375, 0.711786117850718,  -0.402497722862373, 0.799362218714509, 0.426484435556948, -1.16989866993562,  -0.206200160293019, -0.930610309243612, 0.449397565791737, -0.644806454562313,  -0.231422689810958, -1.23636801144537, -0.960955298223015, 0.133956281569561,  -0.999052722969284, -0.141470690813213, 0.167329899648813, -0.198788612671681,  -0.291207188092097, -1.73439703424929, -0.272728331732604, -1.79992948169682,  1.15274097680304, -1.003319485592, 0.148210044292539, 0.519496680749176,  0.00543629447576128, 1.34702083465394, -0.847033417295996, 0.443398017315772,  -0.977149468323314, 2.12449113551361, 0.687698960561541, -0.343368220180396,  0.785169472673946, -1.15557746077052, 1.5089163463927, -1.15549616025736,  -1.55681181020668, -0.0552479252235566, 0.849193162702715, -0.0110967225036592,  -0.760313831780719, 1.17579925167624, 2.41444970903476, -1.95851276822613,  1.4735898934298, -0.47488396149873, 0.981170983785874, -1.82435521953656,  -0.260610817352268, -0.95884531257366, -0.490295710066525, -1.07729671360066,  0.369425910544446, 1.21626648113935, -0.493843235614103, -0.227784720977188,  -1.11164888704727, 0.995833089409624, 0.561828890946087, -1.56427855651588,  1.48107701910531, -1.16920515011223, -1.05201353746636, -1.47184552482902,  -1.19343692076419, -0.347979424691937, 0.532822543149418, -0.710988575850843,  -0.198989137632404, -0.281373323518464, 1.17092627520498, 2.28873318592,  -1.06885661449908, 1.90620418856242, 2.13179771847887, 0.231456363015352,  0.896945737827196, -1.73879271235152, 0.468847940135532, -0.544147673197739,  -0.165414153808447, 0.552166562572813, 1.0333302116035, -0.0461788047835456,  2.63870731259579, 0.589005749225018, -0.202377334229212, 0.441560138002382,  -0.100257702082834, -1.09340399199111, 0.50324733858265, 0.949240091117635,  0.382802056022312, 0.371578210898053, 0.157216401651425, 0.847939889975375,  -1.28339265650518, 1.1582786080896, -0.909106213165988, 0.334990705168581,  0.775854081916407, 0.237140152276008, -1.5598701345872, 0.0243267511888821,  0.334635189158287, 0.989410999147139, 0.500375113541597, 0.576907865455451,  1.14269094011911, -0.707447814422978, -0.618559640981128, -0.0083141961424557,  0.338919733952689, 1.40540629884683, -0.865269852362635, -0.873953956620092,  0.7743182008249, -0.401890241517252, -0.215137830535894, 0.605256130514011,  -0.614567683647475, -0.724422931424412, -0.256942637181777, -0.392072736349559,  -0.686701961744657, 0.875840340130818, -0.481057986042492, 0.0683575908680962,  0.137024892815848, -1.85876851887058, 0.34627657136052, 1.50163381994693,  -0.0137381203294002, -0.77524519751103, 1.3111581356762, 0.260524556554842,  1.01401700762575, 0.215594208474653, 0.613404626091988, 1.44598848106203,  0.658085900745181, 0.375234496491491, -0.674688275938179, 0.580480573296274,  -0.414229332226612, 2.18050398539242, 0.342857643650257, -0.798024661907156,  1.64103616625365, -0.460005111651252, -1.58647098860618, -1.04491567407179,  0.0416536658857592, -0.43202637747734, 0.458591147686799, -0.229351986059321,  -1.85696220984083, -0.289674172981153, 1.76714123786919, -0.442682897300816,  -0.588864402001567, -0.120588258352901, 1.65306128186181, -0.871354568629743,  0.780668270857782, -0.613877869318662, -0.327591311306049, -0.355216015901553,  0.78093407436684, 0.608670171785426, 1.07617901747348, 1.06555765231322,  2.16164641282926, 0.0704564820522911, -2.53522521959317, -0.541334144723391,  -0.775939573541146, -0.295955418239763, 1.15137290542338, -0.568887867531516,  -0.805786340025032, 0.492593861841638, 0.700758337332243, -0.243125291550084,  0.412481176922476, 0.498165309358799, 0.367679114623033, -0.5706028691897,  0.738816517714368, -2.26829132566495, 0.614041040052466, 0.40363580599992,  2.05157932669931, 0.263244987215003, 0.110421189446662, 1.1957636212874,  0.733309513633103, -0.00451169154164245, -0.0212154995950339,  0.138501732981574, -1.07012706995328, 1.23606206697686, -0.539810094735419,  -0.296228914656068, 0.688218803349637, -0.399007303727868, -0.103484852849487,  1.52953404059542, -0.634636458448834, -0.226854589097728, 1.5010840927328,  -0.342463482378634, -0.553727556011483, 0.257626870698959, 0.613121758652457,  -0.652287366777574, -0.138281029086895, -0.123638001869199, -0.964705216383371,  0.0190431840153162, 1.69169235319906, 0.885809071474169, -0.729930145482526,  0.351884683098013, -0.247330893260195, -0.163591831723322, 0.872360560208246,  0.605938213883317, 0.927240812612819, 0.458044436651209, -0.801114024214896,  -0.497123152995539, -1.21296781485439, 0.619712599356425, 1.3596632579562,  -1.6210647627138, 0.0795594993555375, 0.512593137306753, -0.21910193815088,  -0.82593869467054, -1.01357824411184, 1.28206624602831, -0.212144499179618,  1.18487723662641, -0.650612436772287, 1.28736727005853, 0.538933215663317,  0.0255405538039062, 1.1639475327246, -0.367625732117171, -0.363369569501376,  -0.00675336474544712, -0.100472498864641, -0.14859207836112,  -0.182952755436934, -0.85814783765375, 0.958159182178004, -0.839076941832303,  -0.759724279311683, -0.866514819536214, 1.65902566868139, 0.556942277210519,  0.601386129662215, -1.96978682110424, -0.380107748973682, 1.15777354406233,  1.38963465416294, -2.01150842477619, -2.33630850037639, -1.36845977011138,  -1.37309426035361, 0.737388550085491, 0.454709341750177, 1.77668132830334,  0.194985588228136, -0.344612622139577, 1.61267663514805, 0.775709363612466,  0.70427912561433, 1.07215421601982, -0.214130769685907, 0.363631063912172,  1.08356378657411, -1.95227615716347, 0.0155101786160552, -0.87098092003781,  -0.900934214910906, -0.776112067634224, 0.361430751154015, -0.0173493122643544,  -1.11819535979872, 0.58669137484252, 0.486195009924034, 0.473894455796676,  0.361427452891757, 1.21768364371144, -0.673116960131551, -0.598848241837351,  0.735873146511805, 0.60173965147488, 1.10889193968727, -0.0113905983860746,  0.605035960687119, 1.12352815317424, -0.705362053710043, 1.76247207167883,  -0.730020695494859, -1.63415762678176, -0.123993779923598, 0.204139470306424,  -0.68323921942861, -1.01636227170084, -0.671434165633787, 1.12186281570044,  -2.10066370498434, -2.09087185958204, -1.29110001012018, 1.07199151952253,  0.894870152083501, -0.842632298901112, 0.0462974922741544, 0.623368148702539,  0.485091951868738, 0.531944473401682, 0.19742268076406, 0.326566784462888,  -1.44023199151019, 2.11470907987023, -0.184672313220123, 0.492104327529081,  -1.36132698556342, -0.365217557903885, 0.7561265592095, 0.146502808516189,  0.261947248506149, -1.30615904372434, 0.492164032443828, -0.511104000679042,  -1.66057454138599, 0.622376370866293, 0.0157310112822735, -0.733887125964384,  0.27521113796498, -1.8587385910095, 2.07889036683578, -2.36088032720629,  0.327135397295895, -0.227522726278505, -1.18059531411805, 0.330421531559684,  -0.406934780043714, 1.52522324018498, -1.10318386829999, 1.33689257455037,  0.552710403069674, -1.05652641739161, -0.190182994643526, -0.909224176086877,  -2.00091550631878, 1.90897086539068, 1.56898020541778, 0.140301225311454,  -1.42055946460262, 0.513066799512409, -0.987461198891432, 0.597223916449456,  0.867860400604364, 0.189257763959423, -0.0693064069135194, 1.07625933935365,  1.07089132376137, 0.421633377427644, -0.12454978063033, 0.937192065289507,  0.200619126393445, 1.44817884292342, -1.28218256537373, -0.084554210547583,  1.10161395316682, -0.690699575305395, -1.72541538917727, 0.565885692360889,  -0.596158417224681, -0.489345024258458, 0.768893360822469, 2.11461189033211,  0.0447809835460714, 0.947241069815817, -2.1245087083504, 0.0904283264577256,  -1.73914879260394, -1.7022883303277, 1.40829639529108, 0.69816811272235,  0.5760854391738, -0.534336060471033, -1.28198635078153, 0.429614218440963,  -1.12943767906222, 2.41976367943378, 0.0782761044809724, 0.316225234142966,  -1.5794002086685, 0.518905620032067, 1.13539238442515, 0.312404463905503,  0.05554413008899, 1.56545282333373, 0.718830766147177, 0.634325711079806,  1.06590668950288, 0.341888554248612, 3.14336714054499, 0.349950832519039,  1.07333545251137, 0.916437872494606, 0.71765690362959, 1.05548502974692,  0.350592199470931, -1.93603847989057, -0.800741941084278, 2.34293958213089,  1.92087838946788, -0.109538639946886, -2.51282078633865, -0.759623633062425,  -1.50546286281683, -1.67824570835886, 0.950098626350105, 0.124953593318981,  1.43839197208062, -1.32535121599528, -1.00393459317338, 0.642208565811121,  1.15655108036238, -0.173573480005486, -0.964569098629924, 1.85379901629885,  1.68436511079776, 1.05731214066179, 0.814561626549095, -1.19459693410643,  -2.02885658613829, 2.12408653976063, 0.299219062813124, -0.824643051149339,  1.52434567788945, -0.614820405730783, -0.45976066348376, 0.443640987583446,  -1.39598147444982, -0.502477861628173, -1.06059878223795, 1.17460715763047,  0.330371459656535, -0.288433220566114, 1.32156210264278, -0.0454740273538609,  -0.214793901616877, 0.13480451241815, -0.644997500085118, 0.0570719155291017,  0.931184671545328, 0.203663452276264, 1.62579612344971, -0.593355958720706,  -0.308569082055948, 1.33644832852931, -1.20646409452483, -1.40888180770124,  0.644424623754144, -0.408867428984605, -0.979236369824986, -0.927231216419259,  0.79270411853512, -0.68909903597529, -0.0416516404215562, -0.785618777019648,  0.4344554586641, -0.665566901846607, 0.449936130069846, -0.548040463452155,  1.85693691208123, 0.40207812111575, -1.86460318556058, 1.37493052047263,  -0.0746035055403732, 0.22779389971164, 1.38865619323333, 0.405822127350406,  2.56136759868205, -0.526334569793747, 0.352407393770692, 0.475161141291331,  0.791905108509305, 0.831271029700769, 0.548697929846243, -1.24227498092802,  -0.413370331843489, 0.0710386853613732, -0.494271818071687, 0.322143267993693,  -0.796429134375704, 0.907116281386659, 0.207539150347981, 0.547842405004734,  -0.22169528429994, -0.681797182178005, 1.45985706973908, -0.862507887588664,  -0.800383855157766, -0.68514196580317, 1.82132263410678, -0.104744220596189,  1.11147452679476, -1.02752209427414, -0.424123583125695, -0.159149418177784,  0.658170841972663, -0.303464556482093, 0.696562801882666, 0.112772261493095,  0.180256561398902, 2.1212044307174, -0.67724515768195, 0.975279636884236,  1.09733861872641, 1.66738580380783, 0.324119853477316, 0.250784954668287,  0.153309143680586, 0.715229305996022, 0.610541619161322, -0.281816891217829,  0.885998134265093, 0.594126927122837, 0.700118281593645, 2.81491279503349,  0.277078099153463, -0.513741244477688, 0.422214152789072, -0.265564340886777,  -0.770354222150151, -0.376500645612233, 0.110222930784873, 0.972561427059444,  0.356994016994474, -0.824167316178698, -0.155630678991287, -1.52971660161298,  -0.202227510837209, -1.31151722791159, -1.39007893871245, 0.962138141645872,  -0.17813477901026, 0.00328960117506923, 0.511615165517015, -0.456060688239042,  -0.21090411916793, -0.572554868573356, -0.353336222838735, -1.0496560241288,  0.7883855209797, 0.619231580144126, -0.785768492164587, 1.78160405193807,  -0.249928557425748, -0.301097396588297, -1.49933210991998, 0.0342053478098827,  -0.911047222176761, 0.351385587315867, 0.195414362215204, 0.859629926713806,  -0.674155138589608, -1.66258565149713, 0.390045780841936, 0.441365682409681,  1.28396592434211, -0.163185801701405, 0.499569043121688, 0.460144067064487,  -0.476282040022087, -1.55664239038557, -0.689022539113182, 0.148407389086632,  0.135429490904212, -1.37234184047492, -0.0931036773678838, -1.11820793439463,  0.744827357549737, 0.0776825859578852, -0.499928792474106, 0.611743478942702,  -0.869034775516044, 1.16615799034312, -0.769731638856476, -1.80724436689568,  -0.917465740651156, -0.356456664570957, -0.176553706785467, -0.799311276346493,  -0.392796425823479, 0.273725082324397, 0.258141982501913, 0.110412063687764,  -0.915161122522455, 0.212936649900559, 1.40333534124712, -0.808434808833702,  1.91953356242643, 0.865668884307897, -1.2639077211064, -0.956625877294363,  -0.303370061193043, -0.00220360490056386, -0.913071354975655,  -0.649643176443167, 0.376311077588093, 0.2779963826487, -0.754720890372454,  -0.473084717719469, -0.91395042710506, -2.60329970942661, -0.593467498200933,  -0.638979894573173, -0.105916956315576, -0.980291154529057, 0.476235459637523,  -1.41239128440147, 1.63100315238839, -1.12798588227457, 0.438451089522611,  1.90065023437915, -0.700760424199841, -0.3717393835228, -0.678503248030561,  0.101451284461551, 0.553279834051488, -1.52222099582696, -1.02154930182434,  -1.39068213766217, 0.433339795920382, 0.369698592138803, -0.709493645627637,  -1.01894940268142, -1.64074625333368, 0.682710512141664, -0.751876713541874,  0.716236911745028, 1.99500140843909, 1.34613637848412, -0.826907119029068,  1.13846516751087, -0.670743488970344, 0.28830533745626, 0.163840249645937,  0.543705814431928, 0.0089607826965823, 0.29143972911296, 0.632100222998882,  -2.12229472459214, -0.273116168728087, 0.379269650648216, 0.207411582705335,  0.130075482647751, 1.7290152298527, -0.131777383691539, 0.0901800389952223,  -0.122655944893569, 2.34798597248153, -0.62236219518714, 1.09608012991909 ), dim = c(120L, 6L), dimnames = list(NULL, c("x1", "x2", "x3",  "x4", "x5", "x6"))), y = structure(c(4.93675160905657, 5.51638507749885,  13.3857103814937, 15.6358093666903, 23.4520960617303, 2.82246910543871,  8.54637770680711, 34.2794681655917, 9.81218317756429, 8.39141636204283,  4.84962269616763, 19.3594210537824, 18.405488388494, 11.7811241509748,  24.2935446546155, 3.12572276794684, 0.491530236032661, 23.0997334223914,  52.7978898085529, 3.62453179013406, 0.879900516649332, 0.830538757145405,  7.08438672345685, 1.2497644502825, 5.87396071737778, 3.21645235516817,  1.72525939071303, 1.1088182717641, 0.584268994582026, 3.67732467426928,  17.7101001663366, 29.0382533579497, 10.0981338746034, 1.56878766292997,  0.716951221693307, 5.62620875425637, 0.0199571422988603, 47.8805779761185,  8.74104628763554, 22.4283051760904, 14.9800367592855, 1.37394650248577,  67.329386801734, 1.32682771355966, 34.1283225443888, 0.150728388689458,  3.12309321360745, 3.66571368132564, 1.70963730270075, 9.4355131348427,  9.24533085199073, 17.6053765829261, 2.57446516336891, 15.3066418946101,  6.8290186463996, 7.78584036743268, 9.03129813945381, 3.00873247049045,  10.6522800400853, 0.573365623131394, 11.0190624890545, 4.86341622890905,  4.3526539294151, 16.4577197749168, 14.7924677236006, 59.8532670654581,  15.6894908635877, 4.88655204226911, 12.6667711418122, 6.40476021217182,  0.538400725384682, 27.0224048209124, 10.1542937935729, 15.9738029161089,  0.00912242557539366, 49.4240278233831, 12.2048673358785, 0.0627022287172217,  4.92671595579217, 4.43440736725335, 8.93946624128148, 1.04007588018264,  13.2665935205296, 1.60436057774333, 24.7759955459017, 5.43999491759774,  16.0382728601208, 17.768320240211, 0.196885594773419, 2.33979332244808,  12.3948302222347, 24.3034246564912, 21.232719811492, 13.6382280648024,  16.6776921716519, 13.1465768442056, 0.722168595530093, 18.8277947233512,  70.8152906809282, 6.92849929753591, 7.28774399900185, 0.187341362491441,  2.45358195677669, 2.57030630106818, 33.6488961607724, 4.06620222999257,  20.6279334452366, 2.29438927774998, 16.5251878206618, 1.80796394406868,  2.41503669007239, 41.278396568466, 10.817429334182, 4.76381724157014,  16.4365037654651, 6.88301788177341, 2.13250908607021, 1.43581965239719,  8.4115517951168, 32.7660080356402, 1, 0, 1, 1, 0, 0, 0, 0, 0,  1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1,  0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0,  1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0,  1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0,  1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0,  1, 0, 1, 0, 1, 1), dim = c(120L, 2L), dimnames = list(NULL, c("time",  "status")), type = "right", class = "Surv"), type.measure = "deviance",      nfolds = 10, grouped = TRUE, family = "cox", alpha = 1, standardize = TRUE) 
#> 
#> Measure: Partial Likelihood Deviance 
#> 
#>     Lambda Index Measure     SE Nonzero
#> min 0.0358    26   4.869 0.4314       4
#> 1se 0.3666     1   5.146 0.4545       0
#> 
#> $lambda
#> [1] 0.366566
#> 
#> $lambda_choice
#> [1] "1se"
#> 
#> $alpha
#> [1] 1
#> 
#> $standardize
#> [1] TRUE
#> 
#> $cv_type_measure
#> [1] "deviance"
#> 
#> $cv_grouped
#> [1] TRUE
#> 
#> $selection_ties
#> [1] "breslow"
#> 
#> $refit_ties
#> [1] "efron"
#> 
#> $beta_lasso
#> x1 x2 x3 x4 x5 x6 
#>  0  0  0  0  0  0 
#> 
#> $support
#> integer(0)
#> 
#> $selected
#> character(0)
#> 
#> $refit
#> $refit$coef
#> numeric(0)
#> 
#> $refit$fit
#> NULL
#> 
#> $refit$support
#> integer(0)
#> 
#> $refit$converged
#> [1] TRUE
#> 
#> 
#> $theta_refit
#> x1 x2 x3 x4 x5 x6 
#>  0  0  0  0  0  0 
#> 
#> $coef
#> x1 x2 x3 x4 x5 x6 
#>  0  0  0  0  0  0 
#> 
#> $se
#> x1 x2 x3 x4 x5 x6 
#>  0  0  0  0  0  0 
#> 
#> $call
#> coxlasso_fit(X = X, time = time, status = status, lambda_choice = "1se")
#> 
#> attr(,"class")
#> [1] "selSurv_fit"

Choose the inferential target

After fitting the Cox-Lasso, the main routes are:

# Full-model coefficient target: debiased Wald inference
db <- coxlasso_debias(fit)

# Full-model coefficient target: wild bootstrap and Efron's bootstrap
db_boot <- coxlasso_boot(
  fit,
  inference = "debiased",
  type = c("wild", "efron"),
  B = 500,
  conf_level = 0.95,
  seed = 2026
)

# Selected-submodel target: observed support held fixed
fixed <- coxlasso_boot(
  fit,
  inference = "conditional",
  B = 500,
  conf_level = 0.95,
  seed = 2026
)

# Selection and inference on disjoint samples
split <- coxlasso_split(X, time, status, seed = 2026)

# Procedure-level re-selection
reselected <- coxlasso_boot_reselect(
  X, time, status,
  B = 500,
  conf_level = 0.95,
  methods = c("fixed_support", "reselect_fixed_lambda", "reselect_cv_min"),
  seed = 2026
)

These calls should not be interpreted as interchangeable confidence intervals. Debiased inference addresses a full-model coefficient target, fixed-support model-based bootstrap inference addresses coefficients of the selected working model, sample splitting uses a selected model obtained from an independent selection sample, and re-selection describes the repeated data-adaptive procedure.

Inspecting results

summary(db)
summary(db_boot)
summary(fixed)
summary(split)

rs <- summary(reselected)
rs$diagnostics
rs$intervals

For publication-scale bootstrap analyses, use substantially larger B than values used in package smoke tests and inspect method-specific diagnostics together with confidence intervals.