Comments (4)
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 t1
s 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.
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.
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.
Closed with #41.
from bootstrap.jl.
Related Issues (20)
- Add documentation for contributors
- Time-series bootstrapping HOT 12
- Project.toml HOT 10
- Bootstrap resampling from an arbitrary number of distributions? HOT 3
- Broken compatibility against new release of StatsModels (v0.6.0) HOT 11
- Upgrade `Formulas` to `StatsModels` v0.6.0+ HOT 6
- Interquartile range HOT 6
- Bootstrapping a function with 2 inputs? HOT 8
- Distributions.jl dependency HOT 4
- outdated compat info at General Registry HOT 2
- Confidence Interval Output HOT 1
- Update DataFrames dependency HOT 2
- [question] how do you control or limit the sample size? HOT 3
- Feature to retrieve all sampled results so that a histogram can be obtained HOT 6
- Feature Suggestion: Bayesian Bootstrap HOT 2
- Bump Distributions.jl to 0.25 HOT 8
- Request for documentation: Balanced Sampling
- Increased Modularity/Composability
- Exact Bootstrap?
- Allow passing an RNG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap.jl.