Giter Club home page Giter Club logo

bootstrap.jl's Introduction

Bootstrap.jl

Package Status

http://pkg.julialang.org/badges/Bootstrap_release.svg http://pkg.julialang.org/badges/Bootstrap_nightly.svg https://travis-ci.org/julian-gehring/Bootstrap.jl.svg?branch=master https://img.shields.io/coveralls/julian-gehring/Bootstrap.jl.svg

Motivation

Bootstrapping is a widely applicable technique for statistical estimation, especially in the absence of closed-form solutions.

img/bootstraps.png

Functionality

  • Bootstrapping statistics with different sampling methods:
    • Random resampling with replacement (the boot_basic bootstrap)
    • Random weighted resampling with replacement (the boot_weight bootstrap)
    • Balanced random resampling, reducing the bias (the boot_balanced bootstrap)
    • Exact resampling, iterating through all unique samples (the boot_exact, deterministic bootstrap, suited only for small samples sizes)
  • Confidence intervals:
    • Basic (the ci_basic method)
    • Percentile (the ci_perc method)
    • Normal distribution (the ci_normal method)
    • Bias-corrected and accelerated (BCa) (the ci_bca method)

Examples

This example illustrates the basic usage and cornerstone functions of the package. More elaborate cases are covered in the documentation notebooks.

using Bootstrap

Our observations r are sampled from a standard normal distribution.

r = randn(50);

Let’s bootstrap the standard deviation (std) of our data, based on 1000 resamples and with different bootstrapping approaches.

n_boot = 1000;

## basic bootstrap
bs1 = boot_basic(r, std, n_boot);
## balanced bootstrap
bs2 = boot_balanced(r, std, n_boot);

We can explore the properties of the bootstrapped samples, for example estimated bias and standard error of our statistic.

bias(bs1)
se(bs1)

Further, we can estimate confidence intervals for our statistic of interest, based on the bootstrapped samples.

## 95% confidence intervals
cil = 0.95;

## basic CI
bci1 = ci_basic(bs1, cil);

## percentile CI
bci2 = ci_perc(bs1, cil);

## BCa CI
bci3 = ci_bca(bs1, cil);
interval(bci1)

References

The bootstrapping wikipdia article is a comprehensive summary of the topic. An extensive description of the bootstrap is the focus of the book ‘Davison and Hinkley (1997): Bootstrap Methods and Their Application. Cambridge University Press’. Most of the methodology covered in the book is implemented in the boot package for the R programming language.

bootstrap.jl's People

Contributors

juliangehring avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.