Slow bootstrap calculation on Rstudio 2022.02.2 in macOS Monterey 12.4 version

##The following code take too much time to calculate. I tried to execute the same code with other but same laptop model and everything works.

X is a data frame with 1994 rows and 122 columns
X <- as.matrix(scale(X))
n <-nrow(X)
l <- ncol(X)
B <- 1000
bootstrap <-list()
corrs <- list()

Bootstrap algorithm

for (i in 1:B){
index<-sample(1:n,n,replace=TRUE)
bootstrap[[i]]<- X[index,]
corrs[[i]] <- cor(bootstrap[[i]])
}

Best regards.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.