I wonder if someone could help me adjusting the following code to parallelized snow code:

#Creating a data set (not needed to be parallel)
n<-100
p<-100
x<-matrix(rnorm(n*p),p)
y<-rnorm(n)
# Bootstrapping
nboot<-1000
alpha<-0.05
rhoboot <- array(0, dim=c(p,nboot))
bootranks <- array(0, dim=c(p,nboot))
bootsamples <- array( floor(runif(n*nboot)*n+1), dim=c(n,nboot))
for (i in 1:nboot){
rhoboot[,i] <- cor(y[bootsamples[,i]],x[bootsamples[,i],])
bootranks[,i] <- p+1rank(abs(rhoboot[,i]))
}
# Summarise results
rankhigh = apply(bootranks, 1, quantile, probs=alpha/2)
ranklow = apply(bootranks, 1, quantile, probs=1-alpha/2)


Patrik Waldmann

	[[alternative HTML version deleted]]

