Learn R Programming

SurvRank (version 0.1)

riskscore_fct: Main function of SurvRank.

Description

Main input function for SurvRank.

Usage

riskscore_fct(cv.ob, data, th = 0.5, surv.tab = c(0.5), f = NA, fix.var = NA, list.t = "weighted", ncl = 1, plt = F, ...)

Arguments

cv.ob
output of the CVrankSurv_fct
data
same list used as input in CVrankSurv_fct
th
Defaults to 0.5. Threshold of used features. th=0.5 majority vote approach
surv.tab
Defaults to c(0.5). Calculates for selected features survival curves. surv.tab determines quantiles of predictions.
f
Defaults to NA. ranking approach function. One of fsSurvRankConc, fsSurvRankGlmnet, fsSurvRankRf, fsSurvRankBoost, fsSurvRankCox, fsSurvRankRandCox, fsSurvRankRpart, fsSurvRankWang or NA, no calculation
fix.var
Defauts to NA. not NA, fixed number of features is calculated
list.t
Defauls to "weighted". Which toplist should be chosen? Possible choices are "weighted", "unweighted", "rank", "top1se","cluster" or "final"
ncl
Defaults to 1. Number of clusters for parallel execution.
plt
Default=F. Should plot of survival curves be generated?
...
arguments that can be passed to underlying functions, not used now

Value

Output of the riskscore_fct, basically a list containing the following elements
selnames
toplist of features that have been chosen
fixR
Matrix of survival AUCs with fixed number of features, but not fixed features!! (could also be calculated before)
model
cox model output for selected features, according to list.t
aic
AIC criterion of cox model
sum.model
summary object of the fitted cox model
concordance
concordance measure of fitted cox model
sfit
survfit object of the cox model)
pfit
predictions of the cox model (fitted values)
sfit.tab
survfit object according to surv.tab seperation
sfit.cox
Cox model on the groups generated by surv.tab
sfit.diff
surfdiff: Tests if there is a difference between two or more survival curves using the G-rho family of tests, or for a single curve against a known alternative
Additionally two plots are generated: if f is not NA, a boxplot of the survival AUCs, averaged for cross-validation iterations. The second plot shows the resulting survival curves according to surv.tab.

Details

details to follow

Examples

Run this code
## Simulating a survival data set
N=100; p=10; n=3
x=data.frame(matrix(rnorm(N*p),nrow=N,p))
beta=rnorm(n)
mx=matrix(rnorm(N*n),N,n)
fx=mx[,seq(n)]%*%beta/3
hx=exp(fx)
ty=rexp(N,hx)
tcens=1-rbinom(n=N,prob=.3,size=1)
y=Surv(ty,tcens)
data=list()
data$x<-x; data$y<-y
out<-CVrankSurv_fct(data,2,3,3,fs.method="cox.rank")
## Using the weighted toplist
risk<-riskscore_fct(out,data,list.t="weighted")
## Selected names
risk$selnames

Run the code above in your browser using DataLab