cvpl: Function to compute the CVPL

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function computes the cross-validated partial likelihood (CVPL) for the Cox model.

Usage

1
2
cvpl(x, surv.time, surv.event, strata, nfold = 1, setseed,
  na.rm = FALSE, verbose = FALSE)

Arguments

x

data matrix

surv.time

vector of times to event occurrence

surv.event

vector of indicators for event occurrence

strata

stratification variable

nfold

number of folds for the cross-validation

setseed

seed for the random generator

na.rm

TRUE if the missing values should be removed from the data, FALSE otherwise

verbose

verbosity of the function

Value

cvpl

mean cross-validated partial likelihood (lower is better)

pl

vector of cross-validated partial likelihoods

convergence

vector of booleans reporting the convergence of the Cox model in each fold

n

number of observations used to estimate the cross-validated partial likelihood

Author(s)

Benjamin Haibe-Kains

References

Verweij PJM. and van Houwelingen H (1993) "Cross-validation in survival analysis", Statistics in Medicine, 12, pages 2305–2314

van Houwelingen H, Bruinsma T, Hart AA, van't Veer LJ, and Wessels LFA (2006) "Cross-validated Cox regression on microarray gene expression data", Statistics in Medicine, 25, pages 3201–3216.

See Also

logpl, coxph

Examples

1
2
3
4
5
6
7
8
9
set.seed(12345)
age <- rnorm(100, 50, 10)
stime <- rexp(100)
cens   <- runif(100,.5,2)
sevent  <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
strat <- sample(1:3, 100, replace=TRUE)
cvpl(x=age, surv.time=stime, surv.event=sevent, strata=strat,
  nfold=10, setseed=54321)

survcomp documentation built on Nov. 8, 2020, 4:54 p.m.