ROCSI {ROCSI} | R Documentation |
ROCSI
Description
function for ROCSI
Usage
ROCSI(
Dtrain,
Dtest = NULL,
yvar,
xvars,
trtvar,
cvar = NULL,
nfolds = 5,
type = "binary"
)
Arguments
Dtrain |
data matrix for training dataset |
Dtest |
optional data matrix for testing dataset |
yvar |
column name for outcome |
xvars |
a string vector of column names for input markers |
trtvar |
column name for treatment (the column should contain binary code with 1 being treatment and 0 being control) |
cvar |
column name for censor (the column should contain binary code with 1 being event and 0 being censored) |
nfolds |
n fold CV used for cv.glmnet |
type |
outcome type ("binary" for binary outcome and "survival" for time-to-event outcome) |
Details
function for ROCSI
Value
A list with ROCSI output
- beta.aABC
final beta estimated from ROCSI based on
ABC^{(acv)}
- beta.1se
final beta estimated from lambda.1se based on nfold CV
- lambda.aABC
optimal lambda selected by optimizing
ABC^{(acv)}
- fit.cv
fitted cv.glmnet model
- log
log matrix of all lambdas and ABCs
- abc.test
ABC in testing dataset based on optimal beta
- abc.test1se
ABC in testing dataset based on 1se beta
- predScore
a data.frame of testing data and its predictive signature scores (based on beta.aABC) for each subjects
- predScore.1se
a data.frame of testing data and its predictive signature scores (based on beta.1se) for each subjects
Examples
n <- 100
k <- 5
prevalence <- sqrt(0.5)
rho<-0.2
sig2 <- 2
rhos.bt.real <- c(0, rep(0.1, (k-3)))*sig2
y.sig2 <- 1
yvar="y.binary"
xvars=paste("x", c(1:k), sep="")
trtvar="treatment"
prog.eff <- 0.5
effect.size <- 1
a.constent <- effect.size/(2*(1-prevalence))
ObsData <- data.gen(n=n, k=k, prevalence=prevalence, prog.eff=prog.eff,
sig2=sig2, y.sig2=y.sig2, rho=rho,
rhos.bt.real=rhos.bt.real, a.constent=a.constent)
TestData <- data.gen(n=n, k=k, prevalence=prevalence, prog.eff=prog.eff,
sig2=sig2, y.sig2=y.sig2, rho=rho,
rhos.bt.real=rhos.bt.real, a.constent=a.constent)
bst.aabc <- ROCSI(Dtrain=ObsData$data, Dtest = TestData$data, yvar=yvar,
xvars=xvars, trtvar=trtvar, cvar=NULL, nfolds=5, type="binary")
bst.aabc$beta.aABC
bst.aabc$log
bst.aabc$abc.test
bst.aabc$beta.1se
bst.aabc$abc.test1se