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.
boot.ci
with thetype
argument set to "basic" actually does, by taking a look atboot:::basic.ci
andboot:::norm.inter
. You could copy the code and step through it using the debugging tools to investigate what's leading to the behavior $\endgroup$