why am I getting these warnings when running a bootstrap test in R After I run a boostrap method in R I get the following warnings:
Warning messages:
1: In boot.ci(res) : bootstrap variances needed for studentized intervals
2: In norm.inter(t, adj.alpha) :
  extreme order statistics used as endpoints

I'm just trying to understand why I get these as warnings. I'm running an ordinary nonparametric bootstrap.
My code is below:
sqrt_sum_of_squares <- function(data,indices){
    k<-data[indices,]
    return(sqrt(sum(k^2)))
  }
#bootstrap step
  d <- c(4583,3285,3382,3920,4822)
  d <- as.data.frame(d)
  results <- boot(d, sqrt_sum_of_squares, 1000)

 A: The studentized confidence interval (bootstrap-t page 126) is created by using the bootstrap samples to estimate a t-statistic. The confidence interval is defined as
$$
\Big[\hat{\theta} - Q_{(1-\alpha/2)}(t^*_i) s.e.(\hat{\theta}),\hat{\theta} - Q_{(\alpha/2)}(t^*_i) s.e.(\hat{\theta})\Big]\\
t^*_i = \frac{\hat{\theta^*_i}-\hat{\theta}}{s.e.(\hat{\theta^*_i})}
$$
$\hat{\theta}$ is the sample estimate, $\hat{\theta^*_i}$ are the bootstrap estimates, and $Q_{(1-\alpha/2)}(t^*_i)$ are the quantiles from the bootstrapped $t^*_i$ estimates.
For studentized confidence intervals to work, the statistic function needs to return the statistic and also the estimated variance. The R help ?boot has an example of the returning the variance of the difference of two means. Note: The second parameter of diff.means() is frequencies not indices.
For your statistic, I'm unsure how to compute the variance. It is possible to bootstrap the bootstrap in this case, though it gets quite slow. It would be something like
sqrt_sum_of_squares_helper <- function(data,indices){
    k<-data[indices,]
    return(sqrt(sum(k^2)))
}

sqrt_sum_of_squares <- function(data,indices){
    k<-data[indices,]
    b <- boot(as.data.frame(k), sqrt_sum_of_squares_helper, 100)
    return(c(sqrt(sum(k^2)), var(b$t)))
}

