lilikoi.prognosis {lilikoi} | R Documentation |
Pathway-based prognosis model
Description
Fits a Cox proportional hazards regression model or a Cox neural network model to predict survival results.
Usage
lilikoi.prognosis(
event,
time,
exprdata,
percent = NULL,
alpha = 1,
nfold = 5,
method = "median",
cvlambda = "lambda.1se",
python.path = NULL,
path = NULL,
coxnnet = FALSE,
coxnnet_method = "gradient"
)
Arguments
event |
survival event |
time |
survival time |
exprdata |
dataset for penalization, with id in the rownames and pathway or metabolites names in the column names. |
percent |
train-test separation percentage |
alpha |
denote which penalization method to use. |
nfold |
fold number for cross validation |
method |
determine the prognosis index, "quantile", "quantile" or "ratio". |
cvlambda |
determine the lambda for prediction, "lambda.min" or "lambda.1se". |
python.path |
saved path for python3 |
path |
saved path for the L2cross_nopercent.py and L2cross.py files in lilikoi |
coxnnet |
if TRUE, coxnnet will be used. |
coxnnet_method |
the algorithm for gradient descent. Includes standard gradient descent ("gradient"), Nesterov accelerated gradient "nesterov" and momentum gradient descent ("momentum"). |
Value
A list of components:
c_index |
C-index of the Cox-PH model |
difftest |
Test results of the survival curve difference test |
survp |
Kaplan Meier plot |
Examples
# inst.path = path.package('lilikoi', quiet = FALSE) # path = "lilikoi/inst/", use R to run
# inst.path = file.path(inst.path, 'inst')
# python.path = "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3"
# Prepare survival event, survival time and exprdata from your dataset.
# lilikoi.prognosis(event, time, exprdata, percent=NULL, alpha=0, nfold=5, method="median",
# cvlambda=NULL,python.path=NULL, path=inst.path, python.path=python.path,
# coxnnet=FALSE,coxnnet_method="gradient")