uniCoxCV: Function to cross-validate a high dimensional Cox survival...

Description Usage Arguments Details Value Source Examples

View source: R/uniCoxCV.R

Description

Function to cross-validate a high dimensional Cox survival model using Univariate Shrinkage

Usage

1
uniCoxCV(fit,x,y,status,nfolds=5,folds=NULL)

Arguments

fit

object returned by call to uniCox

x

Feature matrix, n obs by p variables

y

Vector of n survival times

status

Vector of n censoring indicators (1= died or event occurred, 0=survived, or event was censored)

nfolds

Number of cross-valdiation folds

folds

Optional list of sample numbers defining folds

Details

This function does cross-validation for a prediction model for survival data with high-dimensional covariates, using the Unvariate Shringae method.

Value

A list with components

devcvm

Average drop in CV deviance for each lambda value

ncallcvm=ncallcvm

Average number of features with non-zero wts in the CV, for each lambda value

se.devcvm

Standard error of average drop in CV deviance for each lambda value

devcv

Drop in CV deviance for each lambda value

ncallcv

Number of features with non-zero wts in the CV, for each lambda value

folds

Indices for CV folds

call

Call to this function

Source

Tibshirani, R. Univariate shrinkage in the Cox model for high dimensional data (2009). http://www-stat.stanford.edu/~tibs/ftp/cus.pdf To appear SAGMB.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(survival)
# generate some data
x=matrix(rnorm(200*1000),ncol=1000)
y=abs(rnorm(200))
x[y>median(y),1:50]=x[y>median(y),1:50]+3
status=sample(c(0,1),size=200,replace=TRUE)

# fit uniCox model
a=uniCox(x,y,status)

# do cross-validation to examine choice of lambda
aa=uniCoxCV(a,x,y,status)

uniCox documentation built on May 29, 2017, 2:19 p.m.