[R] bootstrap/boot unknown distribution

francogrex francogrex at mail.com
Thu Nov 11 16:32:42 CET 2010


Hi, this is a question about bootstrapping, it relates more to the concept
than to the R package boot. But I wonder below if boot can help me. I have
the below to calculate a certain point estimate:

estimate= (0.9 * 0.03 * 700000 *
(((77 * (76 / 76.0)) / 83107) -
((174 * (154 / 154.0)) / 376354)))

= 8.77311

Now I want to calculate confidence intervals around that estimate so I
thought that since some are binomial proportions I would use random binomial
estimates around those within the formula such as to have:

boot_data <- (0.9 * 0.03 * 700000 *
(((rbinom(10000, 83107, (77 / 83107)) * (rbinom(10000, 76, (70 /
76)) / 76.0)) / 83107) -
((rbinom(10000, 376354, (174 / 376354)) * (rbinom(10000, 154, (138 /
154)) / 154.0)) / 376354)))

and then plotting the histogram and getting the quantiles to derive the 95%
confidence intervals. In this case I would get:
> quantile(boot_data, probs=c(0.025, 0.5, 0.975))
     2.5%       50%     97.5%
 4.476521  8.258544 12.434737

Is this a good way of using the bootstrap? What other ways could I use to
get a better confidence interval that is estimated using better methods than
the quantile method? I now the boot package can give the CI using ABc, BC
and bootstrap-t for parametric and non-parametric situations. I think since
I don't have any (known) distribution on my formula to get the data values,
what is the most appropriate way to use the boot?
-- 
View this message in context: http://r.789695.n4.nabble.com/bootstrap-boot-unknown-distribution-tp3038020p3038020.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list