**20**wrote:

Bootstrapping on a correlation is useful because we know that the distribution of correlations is not normal since it's bounded between -1 and 1. In case of two data frames of equal size ( 100 X 10) in both how can this be done using R ?

First, I know we should find the correlation and get the pair-wise correlation across the two data frames.

How to Bootstrap the data by pulling out pairs with or without replacement. Then show the distribution of bootrapped values and the confidence interval as a histogram?

Maybe for such a sample data

```
set.seed(1)
x <- matrix(rnorm(1000), nrow=100, ncol=10)
y <- matrix(rnorm(1000), nrow=100, ncol=10).
```

I found a useful MATLAB code which I have added here Code in MATLABbootstrap correlation coeeficients. Is there something similar in R to obtain a similar plot ? I checked out the documentation in bootstrap package but was unable to understand.

Just use random indices to select rows from your data, i.e. where

`df`

is your dataframe or matrix:`samp <- df[sample(1:nrow(df), 100, replace=T),]`

. That will take a sample (with replacement) of 100 rows of your data.2.0kcross posted http://stats.stackexchange.com/questions/69835/bootstrap-on-correlation-coefficients-in-r

1.6kclosing because the question fails to produce relation to biology.

46kPlease edit the original question, to improve it. Do not create a duplicate.

46k