How to calculate confidence interval using the “bootstrap function” in R
I am trying to calculate the confidence interval in R. Due to some special reasons, I have to do it with the functions in "bootstrap" package.(which means I can't use the functions in "boot" package.) Here is my code. And what I am doing is trying to calculate the Pearson correlation coefficient, and then apply the Bootstrap method (with B = 100) to obtain the estimate of the correlation coefficient. But I don't know how to construct the 95% confidence intervals. library(bootstrap) data('law') set.seed(1) theta <- function(ind) { cor(law[ind, 1], law[ind, 2], method = "pearson") } law.boot <-