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

Description Usage Arguments Value Examples

View source: R/allPvals.R

Description

For all possible separation points for a cohort ordered by a continuous measurement, perform a uni- or multivariate log-rank test

Usage

1
2
allPvals(measure, srv, time = "Time", event = "Event", multiv = NULL,
  statistic = "logtest")

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

multiv

Univariate analysis is performed by default, however a character string specifying a column contained in srv (or a vector of strings specifying multiple columns) detailing additional variables can be included

statistic

the statistical test to be used to compute significance. one of "logtest" (likelihood ratio test), "waldtest" (wald statistic) or "sctest" (log-rank test)

Value

A vector of pvalues calculated from srv ordered by measure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(survivALL)
data(nki_subset)
library(Biobase)
gene_vec <- exprs(nki_subset)["NM_004448", ] #ERBB2 gene id

allPvals(measure = gene_vec, 
    srv = pData(nki_subset), 
    time = "t.dmfs", 
    event = "e.dmfs",
    statistic = "logtest")


allPvals(measure = gene_vec, 
    srv = pData(nki_subset), 
    time = "t.dmfs", 
    event = "e.dmfs",
    multiv = "grade",
    statistic = "sctest")

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