Description Usage Arguments Details Value Examples
Main input function for SurvRank.
1 2  risk_newdat(dat_new, sel_names, dat_old, cv.out = 10, c.time = NA,
detail = NA, plot = F, surv.tab = c(0.5), mcox = T)

dat_new 
a new data set that is not used for the model building but only for prediction 
sel_names 
the variables that were selected (from riskscore_fct) (see 
dat_old 
the data set used to fit the survival model 
cv.out 
number of crossvalidation folds for the prediction 
c.time 
as defined in UnoCsurvAUC time; a positive number restricting the upper limit of the time range under consideration 
detail 
TRUE do the prediction and Uno's CStatistic computation for the models using 1: 
plot 
TRUE do a plot of the survival curves FALSE no plot 
surv.tab 
Defaults to c(0.5). Calculates for selected features survival curves. 
mcox 
TRUE a cox model is fitted FALSE a Cox model with ridge penalty using 
details to follow
Output of the risk_newdat
, basically a list containing the following elements

Matrix of censoringadjusted Cstatistic by Uno et al. for the different crossvalidation folds and if 

if 

model prediction for the new data set 

survfit object according to 

surfdiff: Tests if there is a difference between two or more survival curves using the Grho family of tests, or for a single curve against a known alternative 

model output for 

the censoringadjusted Cstatistic by Uno et al. using the prediction for 
Additionally if plot
is T
, the survival curves given by sfit.tab
are plotted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28  ## 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=1rbinom(n=N,prob=.3,size=1)
y=Surv(ty,tcens)
data=list()
data$x<x; data$y<y
## CV object
out<CVrankSurv_fct(data,2,3,3,fs.method="cox.rank")
## The variables selected from the \code{\link{riskscore_fct}}
selected<riskscore_fct(out,data,list.t="weighted")$selnames
## Applying the risk_newdat function
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=1rbinom(n=N,prob=.3,size=1)
y=Surv(ty,tcens)
data_new=list()
data_new$x<x; data_new$y<y
risk<risk_newdat(data_new,selected,data)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.