GithubHelp home page GithubHelp logo

Comments (4)

juliangehring avatar juliangehring commented on June 16, 2024

Thanks for discovering this error, it certainly needs better handling! After digging into this, here are some of my thoughts:

The issue is caused because all t1s are identical, i.e. the variance of t1 is 0. The value of t0 doesn't play a role here, though it will probably equal to t1 in most case. My concern is that if t1 has no variance, reporting a confidence interval might be conceptionally questionable. @nignatiadis Can I pick your brain on that one? Does talking about a confidence interval sound ill-defined here?

On a more practical matter, other tools (such as boot in R) refuse to compute a confidence interval in such a situation. I'd also argue that if a bootstrap always yields the same value, this often indicates some issues with the data/statistic and the results should be treated with a bit of caution.

I'll need to have a closer look, and I'm happy for any input and thoughts. At the moment, I'm leaning towards

  • checking in all confidence interval methods (not only BCa) if var(t1) == 0
  • reporting an informative warning/error and/or return a confidence interval of (t0, NaN, NaN)

from bootstrap.jl.

nignatiadis avatar nignatiadis commented on June 16, 2024

Hi @juliangehring! I think either choice is fine! Below some thoughts:

Say somebody tries to bootstrap the statistic f(x)=0.0, then maybe the interval [0.0,0.0] indeed makes sense. Similarly if the data is identical.

Of course, if such an interval is returned, it is probably questionable if this is really what the user was going after. But then again, bootstrap intervals are not always accurate anyway, there could be many reasons they might not have the right coverage, yet I still think it makes sense to return them (and the user can decide if they trust the result).

So, I would go with returning a interval of width zero, since Julia in general is not a language that tries to hold people's hands (as long as the difference to R's boot is properly documented).

But also a warning and/or NaN, NaN makes sense to me. I feel an error might be too much though.

from bootstrap.jl.

juliangehring avatar juliangehring commented on June 16, 2024

Thanks @nignatiadis for the detailed explanation - this is a big help! In this case, let's stick with @rofinn original suggestion: Return a confidence "interval" with width 0 around t0, and don't raise a warning for now (I might reconsider this at a later point). This only changes the behaviour of the BCa confidence interval (the others implicitly behave this way), and leaves the interpretation up to the user.

from bootstrap.jl.

juliangehring avatar juliangehring commented on June 16, 2024

Closed with #41.

from bootstrap.jl.

Related Issues (20)

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.