Learn R Programming

permGPU (version 0.14.9)

scoregpu: Computes score test statistic using permGPU

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

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.

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

Run this code
# NOT RUN {
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)) 
# }
# NOT RUN {
<!-- %do% scoregpu(otime,event,x[[i]],"npcox") -->
# }
# NOT RUN {
# carry out analysis with npcox test using B=10 permutations
foreach(i=1:length(x)) 
# }
# NOT RUN {
<!-- %do% scoregpu(otime,event,x[[i]],"npcox", B=10) -->
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab