Code Monkey home page Code Monkey logo

confidencebands.jl's Introduction

ConfidenceBands.jl

Confidence bands for simultaneous statistical inference

CI-stable codecov PkgEval

ConfidenceBands.jl is a lightweight Julia package for computing confidence bands that are useful for simultaneous statistical inference. In contrast to pointwise confidence intervals computed for each parameter separately, a confidence band treats the entire vector of parameters as a single object and is more suitable for comparisons involving multiple parameters.

Example Usage

ConfidenceBands.jl extends the confint function for computing confidence bands. Accepted arguments may vary depending on the type of confidence band. Details may be found from docstrings in the help mode of Julia REPL.

Plug-In Confidence Bands

Computation of a plug-in confidence band is based on a critical value:

using ConfidenceBands
# Compute the critical value for Bonferroni bands with 90% confidence level
# when there are five parameters
criticalvalue(BonferroniBand(), 0.9, 5)
# A variance-covariance matrix Σ is required for sup-t bands
criticalvalue(SuptBand(), 0.9, Σ)

To obtain confidence bands:

# First obtain point estimates θ as a vector and variance-covariance matrix Σ
lb, ub = confint(SuptBand(), θ, Σ, level=0.95)

Bootstrap Confidence Bands

Some types of confidence bands are designed for a valid bootstrap sample provided by users. A bootstrap sample of point estimates needs to be collected in a matrix with each column being a vector of point estimates from the same draw. Currently, quantile-based and critical-value-based bootstrap implementation of sup-t bands (SuptQuantileBootBand and SuptCVBootBand) are implemented following Montiel Olea and Plagborg-Møller (2019):

lb, ub, pwlevel = confint(SuptQuantileBootBand(), draws)
lb, ub, cv = confint(SuptCVBootBand(), θ, draws)

The former additionally returns the confidence level when the intervals from the confidence band are viewed as pointwise confidence intervals. The latter additionally returns the critical value.

References

Montiel Olea, José Luis and Mikkel Plagborg-Møller. 2019. "Simultaneous Confidence Bands: Theory, Implementation, and an Application to SVARs." Journal of Applied Econometrics 34 (1): 1-17.

confidencebands.jl's People

Contributors

junyuan-chen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

allisterh

confidencebands.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

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.