glmnet_ridge_fun: ridge cox model using glmnet

View source: R/glmnet_ridge_fun.R

glmnet_ridge_funR Documentation

ridge cox model using glmnet

Description

ridge cox model using glmnet

Usage

glmnet_ridge_fun(r, data, cvK, formula1, formula2, formula3, formula4, timess)

Arguments

r

a numeric value, a seed to run this method

data

a dataframe, the data used to performance this survival model

cvK

a numeric value, cross-validation fold

formula1

a Surv object from package survival, to calculate a version of the brier score, details please check package pec

formula2

a Surv object from package survival, to calculate a version of the brier score, details please check package pec

formula3

a Surv object from package survival, to calculate a version of the brier score, details please check package pec

formula4

a Surv object from package survival, to calculate a version of the brier score, details please check package pec

timess

a numeric vector of length 15, contains time points to get the time-dependent AUC values

numm

a numeric value, the number of variables,i.e.for example, number of proteins in the data

topnumm

a numeric value, the number of variables selected to be passed into the model, for example, the number of DE genes

fitform_ogl

a Surv object from package survival, the survival function

Value

a data.frame with allevaluation measurements in all columns and rows are each fold results from cross-validation

Examples

data("exampledt", package = "SurvBenchmark")
fitform_ogl=survival::Surv(time,status)~.
formula1=fitform_ogl
formula2=fitform_ogl
formula3=survival::Surv(time,status)~1
formula4=survival::Surv(time,status)~1
form1=as.formula(~.)
timess=seq(as.numeric(summary(cancerdt2_1$time)[2]),as.numeric(summary(cancerdt2_1$time)[5]),(as.numeric(summary(cancerdt2_1$time)[5])-as.numeric(summary(cancerdt2_1$time)[2]))/14)
want=glmnet_ridge_fun(1,cancerdt2_1[,-dim(cancerdt2_1)[2]],5,formula1,formula2,formula3,formula4,timess);

SydneyBioX/SurvBenchmark_package documentation built on June 4, 2022, 12:01 p.m.