0
$\begingroup$

I am using the boot package in R to bootstrap confidence intervals around an estimate of the median. The data is skewed, but the estimator is not biased, thus I am using the Basic Interval. The data is in units of days, from 0-30.

Below are descriptives for the particular variable:

         var   n  mean    sd median trimmed   mad min max range  skew kurtosis   se
Var3     3 100  8.65 11.28    2.0    7.06  2.97   0  30    30  0.90    -0.84 1.13

When I run the analysis I get a lower bound estimate below 0.

> boot.ci(res100,type="basic",index=3)
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 5000 bootstrap replicates

CALL : 
boot.ci(boot.out = res100, type = "basic", index = 3)

Intervals : 
Level      Basic         
95%   (-1,  4 )  
Calculations and Intervals on Original Scale

What does this mean? I didn't think it was possible to get an estimate that was not in the original sample.

$\endgroup$
  • $\begingroup$ It might help to investigate what boot.ci with the type argument set to "basic" actually does, by taking a look at boot:::basic.ci and boot:::norm.inter. You could copy the code and step through it using the debugging tools to investigate what's leading to the behavior $\endgroup$ – Glen_b Aug 17 '14 at 3:25
  • $\begingroup$ In fact if it's similar to the basic bootstrap CI described here (see p8), then I see no clear reason to think it will always stay inside the range of the observed data. $\endgroup$ – Glen_b Aug 17 '14 at 3:57
  • $\begingroup$ @Glen_b - I don't think that's exactly what I am using (although it could be the formula just looks different to me). A description of what I am doing is provided here. I will look into stepping through the code to see what it does. Mainly I'm interested in finding a way to explain this since it contradicts my understanding of CIs. $\endgroup$ – ESmith5988 Aug 17 '14 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.