print.cocktail: print a cocktail object

Description Usage Arguments Details Value Author(s) References Examples

View source: R/method.R

Description

Print a summary of the cocktail path at each step along the path. This function is modified based on the print function from the glmnet package.

Usage

1
2
## S3 method for class 'cocktail'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

x

fitted cocktail object

digits

significant digits in printout

...

additional print arguments

Details

The call that produced the cocktail object is printed, followed by a two-column matrix with columns Df and Lambda. The Df column is the number of nonzero coefficients.

Value

a two-column matrix, the first columns is the number of nonzero coefficients and the second column is Lambda.

Author(s)

Yi Yang and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>

References

Yang, Y. and Zou, H. (2013), "A Cocktail Algorithm for Solving The Elastic Net Penalized Cox's Regression in High Dimensions", Statistics and Its Interface, 6:2, 167-173.
https://github.com/emeryyi/fastcox

Friedman, J., Hastie, T. and Tibshirani, R. (2008) "Regularization Paths for Generalized Linear Models via Coordinate Descent", http://www.stanford.edu/~hastie/Papers/glmnet.pdf
Journal of Statistical Software, Vol. 33(1), 1-22 Feb 2010
http://www.jstatsoft.org/v33/i01/

Simon, N., Friedman, J., Hastie, T., Tibshirani, R. (2011) "Regularization Paths for Cox's Proportional Hazards Model via Coordinate Descent", Journal of Statistical Software, Vol. 39(5) 1-13
http://www.jstatsoft.org/v39/i05/

Examples

1
2
3
data(FHT)
m1<-cocktail(x=FHT$x,y=FHT$y,d=FHT$status,alpha=0.5)
print(m1)

Example output

Loading required package: Matrix

Call:  cocktail(x = FHT$x, y = FHT$y, d = FHT$status, alpha = 0.5) 

       Df   Lambda
  [1,]  0 0.527100
  [2,]  2 0.503100
  [3,]  2 0.480300
  [4,]  3 0.458400
  [5,]  4 0.437600
  [6,]  4 0.417700
  [7,]  5 0.398700
  [8,]  5 0.380600
  [9,]  5 0.363300
 [10,]  5 0.346800
 [11,]  7 0.331000
 [12,]  9 0.316000
 [13,] 11 0.301600
 [14,] 12 0.287900
 [15,] 13 0.274800
 [16,] 15 0.262300
 [17,] 15 0.250400
 [18,] 16 0.239000
 [19,] 17 0.228200
 [20,] 18 0.217800
 [21,] 20 0.207900
 [22,] 20 0.198400
 [23,] 21 0.189400
 [24,] 24 0.180800
 [25,] 26 0.172600
 [26,] 26 0.164700
 [27,] 27 0.157300
 [28,] 29 0.150100
 [29,] 29 0.143300
 [30,] 30 0.136800
 [31,] 30 0.130600
 [32,] 31 0.124600
 [33,] 30 0.119000
 [34,] 31 0.113600
 [35,] 34 0.108400
 [36,] 34 0.103500
 [37,] 34 0.098760
 [38,] 34 0.094280
 [39,] 39 0.089990
 [40,] 40 0.085900
 [41,] 39 0.082000
 [42,] 40 0.078270
 [43,] 40 0.074710
 [44,] 44 0.071320
 [45,] 44 0.068070
 [46,] 47 0.064980
 [47,] 49 0.062030
 [48,] 50 0.059210
 [49,] 52 0.056520
 [50,] 53 0.053950
 [51,] 54 0.051500
 [52,] 54 0.049160
 [53,] 54 0.046920
 [54,] 54 0.044790
 [55,] 55 0.042750
 [56,] 56 0.040810
 [57,] 58 0.038950
 [58,] 59 0.037180
 [59,] 60 0.035490
 [60,] 61 0.033880
 [61,] 61 0.032340
 [62,] 61 0.030870
 [63,] 61 0.029470
 [64,] 61 0.028130
 [65,] 61 0.026850
 [66,] 61 0.025630
 [67,] 62 0.024460
 [68,] 62 0.023350
 [69,] 62 0.022290
 [70,] 62 0.021280
 [71,] 64 0.020310
 [72,] 64 0.019390
 [73,] 64 0.018510
 [74,] 64 0.017670
 [75,] 65 0.016860
 [76,] 66 0.016100
 [77,] 66 0.015360
 [78,] 66 0.014670
 [79,] 66 0.014000
 [80,] 66 0.013360
 [81,] 66 0.012760
 [82,] 66 0.012180
 [83,] 66 0.011620
 [84,] 66 0.011090
 [85,] 67 0.010590
 [86,] 67 0.010110
 [87,] 67 0.009649
 [88,] 67 0.009211
 [89,] 67 0.008792
 [90,] 67 0.008393
 [91,] 67 0.008011
 [92,] 67 0.007647
 [93,] 67 0.007299
 [94,] 68 0.006968
 [95,] 70 0.006651
 [96,] 71 0.006349
 [97,] 72 0.006060
 [98,] 72 0.005785
 [99,] 72 0.005522
[100,] 72 0.005271

fastcox documentation built on May 2, 2019, 10:25 a.m.