# 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