scoregpu: Computes score test statistic using permGPU

Description Usage Arguments Value Note References Examples

View source: R/scoregpu.R

Description

This function can be used to carry out score test inference with GPUs. Currently the function supports two test statistics: the Cox score and rank score tests (Jung et al, 2005), for right-censored time-to-event outcomes.

Usage

1
scoregpu(y, event, markers, test, B=0, stand=TRUE, pval=TRUE, index=FALSE, scale=FALSE)

Arguments

y

The name of the outcome variable.

event

In the case of survival analysis, event is the name of the event indicator.

markers

Expression matrix. Probes are along rows.

test

specifies the test to be performed. Possible options are cox (Cox score test) and npcox (Cox rank score test).

B

number of permutations.

stand

If TRUE, the squared test statistic is returned.

pval

If TRUE, the p-value is returned (stand has to be FALSE).

index

If TRUE, the sample indexes at each permutation are returned.

scale

If TRUE, markers are centered.

Value

This function returns a data frame with one column of test statistics.

Note

The maximum number of patients for the current version is 1000.

References

Jung, S.-H., Owzar K., George, S.L. (2005) A multiple testing procedure to associate gene expression levels with survival.Statistics in Medicine. 24, 20, 3077–88.

Shterev, I.D., Jung, S.-H., George S.L., Owzar K. permGPU: Using graphics processing units in RNA microarray association studies. BMC Bioinformatics 2010, 11:329.

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
set.seed(123)
n<-100
K<-3

x1<-matrix(rnorm(n*K),K,n)
x2<-matrix(rnorm(n*K),K,n)
x3<-matrix(rnorm(n*K),K,n)
otime<-rexp(n)
event<-rbinom(n,1,0.8)

rownames(x1)<-paste("g",1:K,sep="")
colnames(x1)<-paste("p",1:n,sep="")
rownames(x2)<-paste("g",1:K,sep="")
colnames(x2)<-paste("p",1:n,sep="")
rownames(x3)<-paste("g",1:K,sep="")
colnames(x3)<-paste("p",1:n,sep="")

x=list(x1,x2,x3)
library(foreach)

# carry out analysis with npcox test
foreach(i=1:length(x)) 

# carry out analysis with npcox test using B=10 permutations
foreach(i=1:length(x)) 

permGPU documentation built on Feb. 10, 2021, 5:07 p.m.