allHR: For all possible separation points for a cohort ordered by a...

Description Usage Arguments Value Examples

Description

For all possible separation points for a cohort ordered by a continuous measurement, calculate hazard ratio

Usage

1
2
allHR(measure, srv, time = "Time", event = "Event", log2HR = TRUE,
  remove_outliers = TRUE)

Arguments

measure

A continuous variable used to order survival data. Samples must be ordered exactly as in srv

srv

A dataframe that contains at least two columns, detailing event and time to event information. Samples must be ordered exactly as in measure

time

Column name in srv containing time to event information. Must not contain NAs

event

Column name in srv containing event information coded as 0 (no event) and 1 (event). Must not contain NAs

log2HR

Hazard ratios are returned as log2 values by default

remove_outliers

Large hazard ratios result from statistical disproportion when considering edge cases (e.g. 1 vs 99) and can be automaticall removed

Value

A vector of hazard ratios calculated from srv ordered by measure

Examples

1
2
3
4
5
6
library(survivALL)
data(nki_subset)
library(Biobase)
gene_vec <- exprs(nki_subset)["NM_004448", ] #ERBB2 gene id
allHR(measure = gene_vec, srv = pData(nki_subset), time = "t.dmfs", 
    event = "e.dmfs", log2HR = TRUE)

pearcedom/srvALL documentation built on May 24, 2019, 2:49 p.m.