0

I try to run the following code:

 sis.fit <- SIS(y = Surv(time = y[, 1], event = y[, 2]), x = x, 
        family = "cox", penalty = "lasso", tune = "cv", 
        nfolds = 10, type.measure = "deviance", nsis = min(dim(x)), 
        iter = FALSE, seed = 334)

I get the following error:

Error in names(coef.beta) = paste("X", ix1, sep = "") : 'names' attribute [1] must be the same length as the vector [0]

The details of the dataset is:

head(y) # time status # 1 24 1 # 2 31 0 # 3 39 0 # 4 64 1 # 5 72 1 # 6 6 0 str(y) # num [1:46, 1:2] 24 31 39 64 72 6 87 17 53 54 ... # - attr(*, "dimnames")=List of 2 # ..$ : chr [1:46] "1" "2" "3" "4" ... # ..$ : chr [1:2] "time" "status"

>str(x)
#  num [1:46, 1:66] 0.59234 0.30042 0.28278 -0.00966 0.08189 ...
#  - attr(*, "dimnames")=List of 2
#   ..$ : chr [1:46] "1" "2" "3" "4" ...
#   ..$ : chr [1:66] "EIF4EBP1" "TP53BP1" "AKT1.AKT2.AKT3" "AR" ...



sessionInfo()

    R version 3.3.1 (2016-06-21)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows >= 8 x64 (build 9200)

    >>locale:
    [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
    [4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

    >>attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     

    >>other attached packages:
    [1] survival_2.39-4 SIS_0.8-3       glmnet_2.0-5    foreach_1.4.3   Matrix_1.2-6   

    >>loaded via a namespace (and not attached):
    [1] tools_3.3.1      splines_3.3.1    codetools_0.2-14 grid_3.3.1       iterators_1.0.8  ncvreg_3.6-0     lattice_0.20-33 

dput(head(x)) structure(c(0.59233888, 0.300417212, 0.282779258, -0.009662639, 0.081888137, 0.071821141, 1.891360558, 1.845983014, 1.223746856, 1.287132526, 1.836024901, 2.703559168, 0.695837975, 2.118960349, -0.122870706, 0.640943374, 0.60314327, 1.60875525, -0.162463479, 0.50880747, -0.705933398, -0.525207189, 0.061499562, -0.148622444, 2.040085659, 2.44850466, 2.112537213, 1.954211087, 2.01810554, 2.066917799, 1.814608165, 1.233612774, 1.97291466, 1.864084655, 1.054360937, 1.57533212, 1.056160408, 1.592106056, 1.047701744, 0.867332419, 0.725119429, 1.154936732, -0.928966803, -1.23668934, -0.519206999, -1.117465097, -0.926468182, -0.954640374, -0.138661776, -0.849332404, -0.946017006, -0.732916724, -0.687440517, -0.440697106, 1.083047331, 1.979894593, 0.752969035, 1.147822273, 0.886408027, 2.131163278, 0.525196698, 0.324816699, 0.250087633, 0.32890298, 0.477833487, 0.506043467, 0.751508069, -0.398124408, 0.1621809, -0.152152139, -0.133371371, 0.002692295, -0.581221268, -0.364723157, -0.244836848, -0.412096813, 0.147631864, -0.42103204, 1.251728342, 0.964061631, 0.421196237, 0.815402852, 1.048798702, 0.97825866, -0.610074029, -1.136431274, -0.566921181, -0.942363558, -0.523507772, -0.733762824, 2.16214487, 0.535042615, 1.391330567, 1.749096396, 1.446797502, 2.026734486, -0.297706896, -0.465151505, -0.057352555, -0.291471197, -0.273586104, -0.335041107, -0.568415985, -0.446065628, -0.50034528, -0.561282431, -0.567578705, -0.628333156, 0.821088814, 0.484477502, 0.538032896, 0.672321778, 0.261041602, 0.697898761, 0.141067158, -0.008862061, 0.668023906, 0.20414672, -0.504749456, 0.346613216, 0.740046415, 0.67125747, 0.262825717, 0.613090522, 0.935654097, 0.471399257, 0.748728938, 0.090033297, 0.623838432, 0.946172994, 0.948270817, -0.106230375, -0.200922855, 0.041747249, -0.236326799, 0.620669, -0.820844846, 0.941638949, -1.404803862, -1.914668627, -0.188208478, -1.608841301, -2.543121989, -1.850537147, -0.026614593, 0.652418514, 0.216198634, 0.510370719, 0.023247322, -0.036110406, -1.021471283, -1.830610159, -0.279651326, -1.415548586, -1.514134909, -1.46002938, 0.234666669, -0.467504213, -0.953380117, -0.459821829, 0.641920595, -0.252483099, 1.029697917, -0.148317446, 1.018254091, 1.027717767, -0.399991488, 1.112528467, 0.723241903, 0.847692993, 0.210604369, 0.812817666, 0.538846503, 1.090122675, -0.458637715, -0.627950608, -0.484080458, -0.889860961, -0.260631824, -0.493210861, -0.125313023, 0.149490041, 0.437871787, 0.209164447, 0.269349087, 0.011880789, 1.01867013, -0.763833792, 0.600615844, -0.637522792, -1.144034121, -0.112848389, -0.254890347, -0.478094983, 0.045774768, -0.280454651, -0.180494541, -0.295168741, 1.678047933, 1.498848215, 1.640378452, 1.41993218, 0.999271282, 1.764145631, -0.41249725, -0.403594892, 0.142076483, -0.301726916, 1.55677457, -0.64120271, 0.639732191, 1.023674271, 0.507346172, 0.824659283, 0.745833431, 0.407673055, 0.305923656, 0.098890472, 0.339439251, 0.163927018, 0.276584227, 0.21562151, -0.245333447, -0.451487981, -0.245564664, -0.466023513, -0.136975122, -0.317257797, 0.751339172, 0.249842459, 0.452383246, 0.53003177, -0.141238, 0.404412661, 0.495766363, 0.17133434, -0.245021413, 0.069942656, -0.000402216, 0.290231026, -0.742926714, -1.020645488, 0.027922903, -0.692160322, -1.394106904, -0.820393625, 0.620477111, 0.792884185, 0.267310697, 0.610657035, 0.547658979, 0.861059854, -0.504159828, 0.171472422, -0.225432199, -0.295641114, -0.870819249, 0.384605782, -1.772875944, -0.829165559, -1.436890624, -1.721995696, 0.117474875, -2.22845111, -1.019809058, -0.982125123, -0.768494165, -1.005338354, -1.234108037, -0.989908146, -0.256232387, -0.537223666, -0.036260806, -0.3963447, -0.737871047, -0.270846789, 0.130012077, 0.577909992, 0.125650219, 0.282942175, 0.295380552, 0.398949091, 0.572349466, 0.524393917, -0.118631227, 0.606649921, 0.305708156, 1.000781637, -0.215351854, -0.067675504, -0.439687925, -0.176018325, -0.326327328, -0.151682561, -0.723891962, -1.139355142, -0.678056968, -1.067849552, -0.545278057, -0.919803634, -0.458306658, -0.207156987, -0.010905471, -0.11406549, 0.662893352, -0.297267365, 0.404513315, 0.942493538, -0.041111605, 0.516016, 0.512434381, 0.587564748, -1.816899613, -2.079568264, -1.714081947, -1.869230137, -2.241438674, -1.96000547, -0.220566885, -0.630355505, -1.195108703, -1.042624664, -1.054251402, -0.029714133, 1.961411236, 1.799571343, 0.901389107, 1.855978447, 1.674380382, 2.331534735, 0.351674043, 0.041949388, 0.580501674, 0.081066093, -0.254593836, 0.579199256, -0.873388756, -0.899715023, -1.225594816, -0.894035522, -1.071167496, -0.607576421, -0.579409354, -0.42891654, -0.40419286, -0.653214594, -0.799501597, -0.830277595, 0.157643458, 0.540425577, 0.497804502, 0.93198264, 0.648618038, 0.505950367, -0.204253973, -0.438018587, -0.04058347, -0.444432807, -0.315167744, -0.28395961, 1.317984171, 1.118426046, 1.167351777, 1.289784631, 0.92997038, 1.535449466, -0.21381296, -0.937682783, -0.027937067, -0.501453998, -0.068348791, -0.773133369, 1.546970542, 3.883867648, 0.252785234, 2.637906057, 0.255017128, 1.118371728, 1.953724702, -1.453120613, 0.728825176, 0.050025369, -1.887581095, 0.741023774, -0.549088772, -0.570910778, -0.420671423, -0.515175156, -0.745933557, -0.523630049, 1.960533338, 1.953857703, 1.210511452, 2.145358887, 1.899409464, 2.710823573), .Dim = c(6L, 66L), .Dimnames = list( c("1", "2", "3", "4", "5", "6"), c("EIF4EBP1", "TP53BP1", "AKT1.AKT2.AKT3", "AR", "ATM", "BAK1", "BAX", "BCL2", "BCL2L1", "CTNNB1", "BID", "BCL2L11", "JUN", "RAF1", "CASP7", "CAV1", "CHEK1", "CHEK2", "BIRC2", "CLDN7", "COL6A1", "CCNB1", "CCNE1", "CDH1", "EGFR", "ESR1", "FN1", "GATA3", "GSK3A.GSK3B", "ERBB2", "ERBB3", "INPP4B", "MAPK8", "XRCC5", "MAPK1.MAPK3", "MAP2K1", "MRE11A", "CDH2", "CDKN1B", "MAPK14", "TP53", "RPS6KB1", "RPS6KA1", "SERPINE1", "PCNA", "PGR", "AKT1S1", "PTEN", "RAD50", "RAD51", "RB1", "RPS6", "SHC1", "SRC", "TSC2", "XRCC1", "YBX1", "ARAF", "BAD", "BRCA2", "CCNE2", "FOXM1", "GAPDH", "MYH11", "RAB11A.RAB11B", "RBM15")))

dput(head(y)) structure(c(24, 31, 39, 64, 72, 6, 1, 0, 0, 1, 1, 0), .Dim = c(6L, 2L), .Dimnames = list(c("1", "2", "3", "4", "5", "6"), c("time", "status")))

  • Please see how to create a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). It's better to include `dput()` of data rather than `str()` so we can copy/paste into R to test and see what's going on. – MrFlick Oct 14 '16 at 19:17
  • Here you go. Please let me know if you need additional details. – arnabkm2007 Oct 15 '16 at 14:57

0 Answers0