InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

 

 

Bootstrap confidence intervals

    Worked example

    The following examples all employ the same statistic, a 10% trimmed mean, and the same data set - the number of larval cryptolignacae upon each of 50 randomly-selected Wobbiewrot's Rattus anilofilous.

    For these data the observed value of this statistic was 7.225

  1. Normal bootstrap confidence limits

    We applied the sequence given above using this R-code:

    The normal approximation confidence limits we obtained were 6.753229 and 7.696771

  2. Simple percentile limits

    We applied the sequence given above using this R-code:

    The simple percentile limits we obtained were 6.950 and 7.775

  3. Backwards percentile limits

    We applied the sequence given above using this R-code:

    The backward percentile limits we obtained were 6.675 and 7.5

  4. Bias corrected percentile limits

    We applied the sequence given above using this R-code:

      Notice that because, in this instance the statistic's distribution may be unsmooth, our code calculates bias using mean rank, rather than value.

    The bias-corrected percentile limits we obtained were 6.925 to 7.700

  5. Accelerated bias corrected percentile limits

    We applied the sequence given above using this R-code:

    The accelerated bias corrected percentile limits we obtained were 6.9 to 7.7

  6. Studentized percentile limits

    We applied the sequence given above using this R-code:

    The studentized mean we obtained was 35.24868

    Its percentile limits were 19.61014 and 65.89138

    To make those limits comparable to the observed trimmed mean (7.225) we multiplied them by its standard error (the standard deviation of the, first stage, bootstrap trimmed means) giving limits of 4.019533 and 13.505900

      Notice these intervals are wider than the simple percentile ones we obtained, as you should expect when coverage is increased. However, since they were obtained from a modest sample of discrete skewed data, we suspect these intervals may be a little too wide.

  7. Smoothed percentile limits

    We applied the sequence given above using this R-code:

      For simplicity we used simple Gaussian smoothing and a simple percentile interval. Below are the original and smoothed distribution of our data.

      Therefore, because these data are counts, jittered bootstrap data were rounded to the nearest positive whole-number.

    The simple percentile smoothed bootstrap limits we obtained were 6.875 and 7.925

      These limits, whilst wider than our (unsmoothed) simple percentile limits, were narrower than our bootstrap t intervals (above).

  8. Test-inversion percentile limits

    We applied the sequence given above using the following R-code:

      Notice that because these data could not arise if the population had no larval cryptolignacae, negative counts are impossible, and these counts were quite skewed, we constructed our model populations by shifting each part of the population proportional to its difference from zero.

      Also, to avoid the need for iteration, we obtained our results as a P-value plot and used the values estimated confidence limits by interpolation.

      Furthermore because these data were counts, rather than sample an arbitrary (fitted) parametric model, we used a smoothed bootstrap. But, because shifting our model population would change its variance, we calculated the bandwidth after each shift.

      Last, since we are shifting the sample but resampling the smoothed sample, assuming the parameter we are tying to estimate is the 10% trimmed mean of the population, we have further assumed that a sample of 50×5000 observations will give us a reasonably unbiased estimate of Θ.

    The test-inversion limits we obtained, after 100 Gaussian-smoothed percentile bootstrap tests, were 6.673416 and 7.668602

    The 1-sided P-value plot is below.

    Notice that, like ABC limits, these intervals were not constructed assuming is homoscedastic - indeed, given negative data values are rounded to zero, that seemed highly unlikely. Instead this model assumes these data, being right-skewed, have a positive association between location and variance.