cvRLassoCox {RLassoCox} | R Documentation

## Cross-validation for the RLasso-Cox model

### Description

Does k-fold cross-validation for the RLasso-Cox model, produces a plot, and returns a value for lambda

### Usage

    cvRLassoCox(x, y, globalGraph = NULL, nfolds = 10, Gamma = 0.3,
                DEBUG = TRUE, standardize = TRUE, ...)

### Arguments

`x` | a n x p matrix of gene expression measurements with n samples and p genes.
`y` | a n x 2 matrix of survival data. The two columns represent disease status 'status' and survival time 'time' respectively.
`globalGraph` | An `igraph` R object containing the interaction network.
`nfolds` | number of folds - default is 10.
`Gamma` | A numeric value. The restart probability in directed random walk. Default is `Gamma = 0.3`.
`DEBUG` | Logical. Should debugging information be shown.
`standardize` | Logical flag for `x` standardization, prior to fitting the model. Default is `TRUE`.
`...` | Arguments to be passed to `cv.glmnet` in R package `glmnet`.

### Value

`glmnetRes` | An object of class "cv.glmnet"
`PT` | The topological weights of genes

### Author(s)

Wei Liu

### References

Integration of gene interaction information into a reweighted Lasso-Cox model for accurate survival prediction. To be published.

### Examples

    library("survival")
    library("igraph")
    library("glmnet")
    library("Matrix")

    data(dGMMirGraph)
    data(mRNA_matrix)
    data(survData)

    trainSmpl.Idx <- sample(1:dim(mRNA_matrix)[1], floor(2/3*dim(mRNA_matrix)[1]))
    testSmpl.Idx <- setdiff(1:dim(mRNA_matrix)[1], trainSmpl.Idx)
    trainSmpl <- mRNA_matrix[trainSmpl.Idx ,]
    testSmpl <- mRNA_matrix[testSmpl.Idx ,]

    cv.res <- cvRLassoCox(x=trainSmpl, y=survData[trainSmpl.Idx ,],
                            globalGraph=dGMMirGraph, nfolds = 5)

[Package RLassoCox version 1.0.0 Index]