print.Coxnet: Print a Coxnet Object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/print.Coxnet.R

Description

Print a summary of results along the path of lambda.

Usage

1
2
## S3 method for class 'Coxnet'
print(x, digits = 4, ...)

Arguments

x

fitted Coxnet object

digits

significant digits in printout

...

additional print arguments

Details

The performed model is printed, followed by fit and fit0 (if any) from a fitted Coxnet object, or fit and cvh (if any) from a fitted loCoxnet object

Value

The matrix above is silently returned

Author(s)

Xiang Li, Donglin Zeng and Yuanjia Wang
Maintainer: Xiang Li <xl2473@columbia.edu>

See Also

Coxnet, loCoxnet, coxsplit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1213)
N=1000;p=30;p1=5
x=matrix(rnorm(N*p),N,p)
beta=rnorm(p1)
xb=x[,1:p1]
ty=rexp(N,exp(xb))
tcens=rbinom(n=N,prob=.3,size=1)  # censoring indicator
y=cbind(time=ty,status=1-tcens)

fiti=Coxnet(x,y,penalty="Lasso",nlambda=10,nfolds=10) # Lasso
print(fiti)

Example output

Loading required package: Matrix

Regularized Cox model:  Lasso (L1)


The path of lambda:

      lambda    cvm    cvse nzero index
1  4.551e-01 -6.852 0.02890     1      
2  1.635e-01 -6.556 0.03770     1      
3  5.877e-02 -6.512 0.04430     1   max
4  2.112e-02 -6.514 0.04946    17      
5  7.591e-03 -6.523 0.05186    26      
6  2.728e-03 -6.528 0.05215    27      
7  9.804e-04 -6.531 0.05220    29      
8  3.523e-04 -6.532 0.05222    30      
9  1.266e-04 -6.532 0.05223    30      
10 4.551e-05 -6.532 0.05224    30      


Tuning the number of non-zeros with lambda:

    lambda    cvm nzero
1 0.007591 -6.504     1

Coxnet documentation built on May 29, 2017, 9:51 a.m.