tnsKM,TNS-method {RTNsurvival}R Documentation

Kaplan-Meier analysis for TNS class objects

Description

Creates survival curves and tests if there is a difference between curves using 'survfit' and 'survdiff' functions, respectivelly.

Usage

## S4 method for signature 'TNS'
tnsKM(
  tns,
  regs = NULL,
  sections = 1,
  undetermined.status = TRUE,
  verbose = TRUE
)

Arguments

tns

A TNS object, which must have passed GSEA2 analysis.

regs

An optional string vector listing regulons to be tested.

sections

A numeric value for sample stratification. The larger the number, the more subdivisions will be created for the Kaplan-Meier analysis.

undetermined.status

a logical value. If TRUE, regulons assigned as 'undetermined' will form a group.

verbose

A logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE).

Value

Results from 'survfit' and 'survdiff', including log-rank statistics.

Examples

# load survival data
data(survival.data)

# load TNI-object
data(stni, package = "RTN")

stns <- tni2tnsPreprocess(stni, survivalData = survival.data, 
        keycovar = c('Grade','Age'), time = 1, event = 2)
stns <- tnsGSEA2(stns)
stns <- tnsKM(stns)
tnsGet(stns, "kmTable")


[Package RTNsurvival version 1.18.0 Index]