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

Description Usage Arguments Value Examples

View source: R/allHR.R

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)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: survival
  [1] -4.563397e+00 -8.904506e-01  1.816569e-01 -4.029330e-01 -8.401771e-01
  [6] -1.191478e+00 -1.402118e+00 -1.055405e+00 -9.255842e-01 -9.255842e-01
 [11] -1.175258e+00 -8.873963e-01 -6.852524e-01 -5.391589e-01 -4.131288e-01
 [16] -2.512127e-01 -1.206927e-01 -2.146303e-02 -2.050834e-01 -4.058750e-01
 [21] -3.155729e-01 -4.371582e-01 -5.364837e-01 -4.376606e-01 -5.600368e-01
 [26] -6.369136e-01 -5.739293e-01 -6.651362e-01 -5.837484e-01 -5.211401e-01
 [31] -6.271721e-01 -5.729967e-01 -6.632566e-01 -6.097701e-01 -5.602157e-01
 [36] -4.892275e-01 -5.960711e-01 -5.483365e-01 -6.351773e-01 -5.840102e-01
 [41] -6.776861e-01 -6.050110e-01 -5.626040e-01 -5.149043e-01 -5.923201e-01
 [46] -5.407762e-01 -4.906093e-01 -5.470015e-01 -5.076781e-01 -4.677617e-01
 [51] -4.245598e-01 -4.833733e-01 -5.147577e-01 -4.749661e-01 -5.316229e-01
 [56] -4.820245e-01 -5.573695e-01 -6.281806e-01 -5.962104e-01 -5.673602e-01
 [61] -5.308118e-01 -5.756829e-01 -5.280735e-01 -5.743993e-01 -5.583731e-01
 [66] -5.100191e-01 -4.628308e-01 -5.191748e-01 -4.872644e-01 -5.339017e-01
 [71] -5.013285e-01 -4.632849e-01 -4.974087e-01 -4.875841e-01 -5.456777e-01
 [76] -5.050213e-01 -5.554418e-01 -5.961544e-01 -5.894165e-01 -5.528097e-01
 [81] -6.040544e-01 -5.653556e-01 -5.251042e-01 -5.029171e-01 -4.802447e-01
 [86] -4.567379e-01 -4.226622e-01 -4.720089e-01 -4.409661e-01 -4.153124e-01
 [91] -3.745726e-01 -3.466121e-01 -3.120517e-01 -3.000890e-01 -3.553261e-01
 [96] -3.968110e-01 -4.278768e-01 -4.027209e-01 -4.314542e-01 -4.767928e-01
[101] -4.554647e-01 -4.319147e-01 -3.974804e-01 -3.733358e-01 -3.450940e-01
[106] -3.115225e-01 -3.496874e-01 -3.997568e-01 -3.783815e-01 -3.578466e-01
[111] -3.279985e-01 -2.971776e-01 -2.747073e-01 -2.442685e-01 -2.976381e-01
[116] -2.685917e-01 -2.385699e-01 -2.191872e-01 -1.878238e-01 -1.689194e-01
[121] -1.689194e-01 -1.429242e-01 -1.235600e-01 -1.024884e-01 -6.918051e-02
[126] -5.066871e-02 -2.380799e-02  8.993664e-03 -4.522413e-02 -8.739076e-02
[131] -6.681554e-02 -4.861548e-02 -7.867466e-02 -6.029515e-02 -2.803672e-02
[136] -5.604167e-02 -1.027523e-01 -8.483202e-02 -5.535385e-02 -3.693624e-02
[141] -7.709971e-02 -1.268587e-01 -9.506429e-02 -6.734501e-02 -4.809526e-02
[146] -2.734289e-02 -5.155158e-02 -9.419626e-02 -7.469817e-02 -5.522131e-02
[151] -3.264169e-02 -1.507953e-02  1.131561e-02  2.912401e-02 -4.890840e-03
[156] -5.030739e-02 -2.548464e-02  2.069530e-05  3.129450e-02  5.869993e-02
[161]  7.648070e-02  1.028465e-01  1.270615e-01  9.381437e-02  5.319798e-02
[166]  5.525762e-02  7.308336e-02  9.566004e-02  7.396478e-02  2.199751e-02
[171]  5.345163e-02  2.134072e-02  3.926680e-02  4.082004e-03 -3.929865e-02
[176] -6.985492e-02 -1.180572e-01 -1.473823e-01 -1.245248e-01 -1.695681e-01
[181] -1.514388e-01 -1.332813e-01 -1.679103e-01 -1.417749e-01 -1.214700e-01
[186] -9.518855e-02 -6.531211e-02 -4.684707e-02 -8.826481e-02 -6.238538e-02
[191] -4.037290e-02 -1.962764e-02 -6.803509e-02 -4.719869e-02 -8.343780e-02
[196] -5.013847e-02 -2.768449e-02 -7.244228e-02 -1.235210e-01 -9.242169e-02
[201] -7.215457e-02 -5.312292e-02 -1.894072e-02 -7.537917e-02 -4.734725e-02
[206] -1.271373e-02  2.218190e-02 -2.059843e-02 -2.247647e-04  2.789049e-02
[211]  4.815416e-02  5.147015e-03  5.147015e-03  2.500150e-02  4.878753e-02
[216]  6.946798e-02  2.404177e-02  6.085910e-02  9.807781e-02  1.297213e-01
[221]  1.606414e-01  1.820043e-01  2.084305e-01  2.320082e-01  2.541691e-01
[226]  2.785115e-01  3.070268e-01  3.388151e-01  3.653849e-01  3.881715e-01
[231]  4.243007e-01  4.483051e-01  4.149335e-01  4.542602e-01  4.635339e-01
[236]  4.880030e-01  5.179544e-01  5.457324e-01  5.714134e-01  5.903955e-01
[241]  6.165443e-01  5.934508e-01  6.198433e-01  5.637545e-01  6.109976e-01
[246]  6.594140e-01  7.091542e-01  6.493001e-01  6.854417e-01  7.142922e-01
[251]  6.754753e-01  6.216578e-01  6.646872e-01  6.128616e-01  6.469178e-01
[256]  6.864832e-01  7.210800e-01  6.548807e-01  7.079817e-01  7.448134e-01
[261]  7.839451e-01  8.375437e-01  7.684906e-01  7.042006e-01  7.172599e-01
[266]  7.707343e-01  7.303315e-01  6.868476e-01  7.321857e-01  7.712937e-01
[271]  8.259354e-01  8.708353e-01  9.402412e-01  1.005742e+00  1.006143e+00
[276]  9.699776e-01  1.053669e+00  1.104927e+00  1.026267e+00  1.095541e+00
[281]  1.024513e+00  1.051300e+00  1.116784e+00  1.200944e+00  1.109240e+00
[286]  1.166856e+00  1.069346e+00  1.135827e+00  1.047378e+00  1.111144e+00
[291]  1.202654e+00  1.126347e+00  1.029671e+00  9.534647e-01  1.036446e+00
[296]  1.110168e+00  1.201982e+00  1.090189e+00  1.218301e+00  1.171843e+00
[301]  1.320401e+00  1.168608e+00  1.371442e+00  1.288083e+00  1.228491e+00
[306]  1.378997e+00  1.184556e+00  1.370015e+00  1.177955e+00  1.039435e+00
[311]  1.368074e+00  1.217621e+00  8.957515e-01  3.559031e-01  1.044744e+00
[316]            NA  1.843580e+00 -2.020620e+01            NA

survivALL documentation built on May 1, 2019, 11:02 p.m.