ExposureSurvModel: Exposure Cox model

ExposureSurvModelR Documentation

Exposure Cox model

Description

ExposureSurvModel: Given survival data, fits a multivariate Cox proportional hazards model to exposure data.

Usage

## S4 method for signature 'SignExp,Surv'
ExposureSurvModel(Exposures, surv, addata, 
    max_instances=200, quant=0.5, cutoff_pvalue=0.05, cutoff_hr=NA, 
    plot_to_file=FALSE, file="ExposureSurvival_plot.pdf", colors=TRUE, ...)

Arguments

Exposures

A SignExp object returned by signeR function or a matrix of exposures (with signatures in rows and a column for each sample).

surv

a Surv object from package survival or a matrix with columns "time" and "status" (the last indicates whether 1:an event occurred or 0:there was a loss of follow up).

addata

a data frame with additional data (one sample per row) that will be used in the Cox model along with exposure data.

max_instances

Maximum number of the exposure matrix instances to be analyzed. If the number of available E instances is bigger than this parameter, a subset of those will be randomly selected for analysis.

quant

the quantile of p-values and hazard ratios which will be used for selecting survival significant signatures. Default is 0.5, which means the median p-value and hazard ratio will be considered.

cutoff_pvalue

threshold for p-values quantile for signatures to be considered as significant.

cutoff_hr

threshold for hazard ratio quantile for signatures to be considered as significant.

plot_to_file

Whether to save the plot to the file parameter. Default is FALSE.

file

Output file to export p-values boxplots and Kaplan-Meier curves.

colors

Boolean variable, if TRUE p-values boxplots of significant signatures will be colored in green, cutoff line will be colored in red and line segments showing the transformed p-value quantile used for significance evaluation will be colored in blue. Otherwise the plot will be black & white.

...

additional parameters for test algorithm defined by the method parameter.

Value

A list with the following items:

Significance

boolean array with one entry for each signature, indicating whether its levels of exposure are significant to survival.

Stats

data frame containing hazard ratios and pvalues for signatures (one per line) on fitted Cox models.

Examples

# assuming signatures is the return value of signeR()

# feature vector, with one value for each sample
library(survival)
my_surv <- Surv(rnorm(30,730,100),sample(c(0:1), 30, replace = TRUE))

Exp_corr <- ExposureSurvModel(signatures$SignExposures, surv = my_surv)

# see also
vignette(package="signeR")

rvalieris/signeR documentation built on April 20, 2024, 2:08 p.m.