Robert A. LaBudde
2007-Oct-18 17:11 UTC
[R] [R} Getting 'tilting' confidence intervals in R
[Resend with proper subject line] I am trying to compute bootstrap confidence intervals for a sample using R 2.5.1 for Windows. I can get "Normal", "Basic", "Percentile", "BCa" and "ABC" from boot.ci() and boot() in the Davison & Hinkley "boot" package. But I can't figure out how to use tilt.boot() to get the "tilting" confidence interval. Here's a program snippet: g = rgamma(N,shape=2,scale=3) #Generate a sample of N random deviates varf = function (x,i) { var(x[i]) } b = boot(g, varf, R=1000) boot.ci(b) fabc = function (x, w) { sum(x^2*w)/sum(w)-(sum(x*w)/sum(w))^2 } #wgt average (biased) variance abc.ci(g, fabc) #ABC method confidence interval bt = tilt.boot(g, varf, R=c(1000,1000,1000)) The bt object doesn't have a confidence interval method or property, even though alpha=c(.025, .975) is a default parameter in the tilt.boot() call. This must be simple, but I'm not finding out the answer from the documentation. Also, use of any other packages to accomplish the tilting interval would also be useful. Thanks.