predict.RLassoCox {RLassoCox} | R Documentation

## Make predictions from a RLasso-Cox model

### Description

This function predicts the risk of new samples from a fitted `RLasso-Cox` model.

### Usage

    ## S3 method for class 'RLassoCox'
    predict(object, newx, ...)

### Arguments

`object` | Fitted `"RLassoCox"` model object.
`newx` | A matrix with new samples to predict.
`...` | Arguments to be passed to `predict.glmnet` in R package `glmnet`.

### Value

Predicted results of new patients in `newx`.

### Author(s)

Wei Liu

### 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 ,]

    res <- RLassoCox(x=trainSmpl, y=survData[trainSmpl.Idx ,],
                    globalGraph=dGMMirGraph)
    lp <- predict(object = res, newx = testSmpl)

[Package RLassoCox version 1.0.0 Index]