rankConcordance: Compute concordance indices

Description Usage Arguments Details Value See Also Examples

Description

Computes concordance indices for a gene expression data set, and returns the concordance index and the z-score.

Usage

1
rankConcordance(dataset, survivalTimes, followup)

Arguments

dataset

A matrix, where the column names are gene identifiers and the values are gene expression levels. Each row should contain data for a single patient.

survivalTimes

A vector of survival times. The length must equal the number of rows (i.e. patients) in dataset.

followup

A vector of 0 or 1 values, indicating whether the patient was lost to followup (0) or not (1). The length must equal the number of rows (i.e. patients) in dataSet.

Details

This function is a wrapper for concordance.index in the survcomp package. It applies the latter over the columns of dataset to calculate concordance indices and the corresponding z-score for each gene.

Value

The function returns a matrix with two columns:

cindex

concordance index estimate.

z

z-score of the concordance index estimate.

and as many rows as dataset. The row names contain the gene identifiers.

See Also

saps concordance.index

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 25 patients, none lost to followup
followup <- rep(1, 25)

# first 5 patients have good survival (in days)
time <- c(25, 27, 24, 21, 26, sample(1:3, 20, TRUE))*365

# create data for 100 genes, 25 patients
dat <- matrix(rnorm(25*100), nrow=25, ncol=100)
colnames(dat) <- as.character(1:100)

ci <- rankConcordance(dat, time, followup)
z <- ci[,"z"]
range(z)
hist(z)

saps documentation built on Oct. 5, 2016, 4:32 a.m.