Confidence Intervals – Using Monte Carlo and Nonparametric Methods for Confidence Intervals of Mean Estimate

confidence intervalr

I have 2×2 design with n = 3 (averages) for each group (see here). I am not sure that my data follows any particular distribution, but I would like to use confidence intervals as error bars in a dot plot. Thus I can't really use sd, se or bootstrapping from a distribution. The approach I am after is described in this article. My initial feeling is that I should use boot package. I have 3 replicates, which consist of different number of measurements. I would like to use averages of these replicates to calculate the confidence intervals. Something like:

x1 <- rnorm(50, 14,3)
x2 <- rnorm(35, 7,1)
x3 <- rnorm(40, 15,9)

d <- c(mean(x1), mean(x2), mean(x3))
b <- boot(d, function(u,i) mean(u[i]), R = 999, sim = "ordinary")
boot.ci(b, type = c("all"))

The help file for boot()function says "For the nonparametric bootstrap, possible resampling methods are the ordinary bootstrap, the balanced bootstrap, antithetic resampling, and permutation". Without background in statistics, I am having hard time understanding what do these different options do and what would be the most suitable for this case. boot.ci() function gives 5 different answers, which all seem to differ considerably. I am pretty confused. Could anyone clarify following related questions:

  1. Is this a right approach?
  2. Which combination should I use in this case?
  3. Why so many options?

Best Answer

I think you are proceeding incorrectly. You should be constructing :

d=c(x1,x2,x3)

And then examining the statistics of interest before applying them to the samples.