rsig (version 1.0)

rsig: Robust Signature Selection for Survival Outcomes

Description

Find a robust signature, i.e. a set of features, using averaged and shrucken generalized linear models. Subsamples are taken to fit models, via $\ell_1$-penalized Cox regression (lasso) or preconditioned lasso (prlasso) algorithm.

Usage

rsig(surv, X, model, n.rep = 10L, plapply = mclapply, sd.filter = NULL, verbose = TRUE)

Arguments

surv
[Surv] Survival object, see Surv.
X
[data.frame] Data frame or matrix or matrix of input data (rows: examples, columns: features). Columns must have names assigned.
model
[character(1)] Model to use. One of "rs.prlasso" (preconditioned lasso with robust selection), "rs.lasso" (penalized Cox regression with robust selection), "prlasso" (preconditioned lasso), or "lasso" (penalized Cox regression)
n.rep
[integer] The number in replicates to be used for model aggregation. A large enough number is suggested.
plapply
[function] Function used for internal parallelization. Default is mclapply for multi-core parallel execution. Change it to lapply for single-core execution.
sd.filter
[list] Pre-filter features by their standard deviation, by one of the options specified: topk: no. of features to be selected with largest standard devations, or quant: the min percentile in standard deviations of features to be selected.
verbose
[logical] Controls message output.

Value

Object of class “rsig”; a list consisting of
model
model specified by the user
sd.filter
sd.filter object
beta
coefficient vector
intercept
intercept

See Also

predict.rsig, rsig.eval, rsig.all

Examples

Run this code
# An example adapted from glmnet package

set.seed(11011)
n = 300
p = 10
nz = 3
X = matrix(rnorm(n*p),n,p,dimnames=list(NULL,seq_len(p)))
beta = rnorm(nz)
f = X[,seq_len(nz)] %*% beta
h = exp(f) / 365.25
t = rexp(n,h)
tcens = rbinom(n=n,prob=.3,size=1) # censoring indicator
S = Surv(t, 1-tcens)

fit = rsig(S, X, "rs.prlasso", n.rep=2)
pred = predict(fit, X)
perf = rsig.eval(pred, S, X)

Run the code above in your browser using DataLab