Hello,
 
I'm planning to implement a bootstrap correlation ranking method with snow on a MPI cluster with 512 nodes. I now wonder if I could get some advice on how to implement the single processor example code below in the most efficient way:
 
x <- matrix(rnorm(1000*1000),ncol=500)
y <- matrix(rnorm(2000),ncol=1)
 
nboot<-500
alpha<-0.05
 

bootcorfunc <- function(y, x, nboot, alpha) {
dimx<-dim(x)
rhoboot <- array(0, dim=c(dimx[2],nboot)) 
bootranks <- array(0, dim=c(dimx[2],nboot)) 
bootsamples <- matrix(floor(runif(dimx[1]*nboot)*dimx[1]+1), ncol=nboot)
for (i in 1:nboot){ 
rhoboot[,i] <- cor(y[bootsamples[,i]],x[bootsamples[,i],]) 
bootranks[,i] <- dimx[2]+1-rank(abs(rhoboot[,i])) 
}
apply(bootranks, 1, quantile, probs=alpha/2)
}

rankhigh<-bootcorfunc(y,x,nboot, alpha)
 
 
 
Patrik Waldmann

	[[alternative HTML version deleted]]

