set.seed(123)
e <- rnorm(1, mean = 5, sd = 1)
e.b <- matrix(rnorm(1000, mean = 5, sd = 1), ncol = 10) # Bootstrap data
B <- 100 # Number of bootstrap samples
ahat <- 0.4 # Bias correction parameter
a1 <- 0.025 # Low confidence level
a2 <- 0.975 # High level of confidence
P_CI(e.b,a1,a2)
B_CI(e.b, e, B, ahat, a1, a2)
Run the code above in your browser using DataLab