rowCoxTests: rowCoxTests

Description Usage Arguments Value Author(s) Examples

Description

method for performing Cox regression

Usage

1
rowCoxTests(X, y, option = c("fast", "slow"), ...)

Arguments

X

Gene expression data. The following formats are available:

matrix Rows correspond to observations, columns to variables.

data.frame Rows correspond to observations, columns to variables.

ExpressionSet rowCoxTests will extract the expressions using exprs().

y

Survival Response, an object of class:

Surv if X is of type data.frame or matrix

character if X is of type ExpressionSet.

In this case y is the name of the survival

response in the phenoData of X. If survival

time and indicator are stored separately

in the phenoData one can specify a two-element

character vector the first element representing

the survival time variable.

option

"fast" loops over rows in C, "slow" calls coxph

directly in R. The latter method may be used if

something goes wrong with the "fast" method.

...

currently unused

Value

dataframe with two columns: coef = Cox regression

coefficients, p.value =

Wald Test p-values. Rows correspond to the rows of X.

Author(s)

Yuqing Zhang, Christoph Bernau, Levi Waldron

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#test


##regressor-matrix (gene expressions)


X<-matrix(rnorm(1e6),nrow=10000)


#seed


set.seed(123)


#times


time<-rnorm(n=ncol(X),mean=100)


#censoring(1->death)


status<-rbinom(n=ncol(X),size=1, prob=0.8)





##survival object


y<-Surv(time,status)





## Do 10,000 Cox regressions:


system.time(output <- rowCoxTests(X=X,y=y, option="fast"))

simulatorZ documentation built on Nov. 8, 2020, 5 p.m.