ignacio82 / vizdraws

vizdraws creates interactive visualizations using draws from a prior and posterior distributions.
http://vizdraws.martinez.fyi
10 stars 10 forks source link

MME = 0 where data has values at exactly 0 #39

Open drcthal opened 5 years ago

drcthal commented 5 years ago

Right now we lump 0 into worse if MME==0. Is that intentional, or should we add that to equivalent? I know right now if MME==0 we also have special code that makes sure there is no equivalent group, but I'm thinking about rewriting the partitioning to be done in JS, and potentially dynamic with an MME slider, so I'd like to have generic logic.

ignacio82 commented 5 years ago

@drcthal as long as the draws come from a continuous distribution the Pr(x==0) = 0. MME=0 is just saying that for this intervention any change is meaningful so the distribution should be split into better an worse. MME>0 means that there are changes small enough that are for all practical purposes equivalent to 0. In this case, we add the "equivalent" area when we split the distribution.

If this doesn't make sense, or I'm missing something from your question, I would be happy to have a quick call today to discuss the best way of implementing this.

drcthal commented 5 years ago

Yeah, it's mostly a corner case thing that probably won't come up, but if it does I want to handle it. e.g. no reason you couldn't use this with a count model, or maybe you have a model where stan hits a corner and the posterior has a bunch of 0s (although I guess machine precision-wise those probably wouldn't be exactly 0 either).

ignacio82 commented 5 years ago

ok, if MME=0 and x==0 we should say treat that case as equivalent.

drcthal commented 5 years ago

Bah, with the new more general breaks logic a fix (if you even consider it that) for isn't going to be generalizable so I'm going to forget about it. I'm leaving it so people are partitioned into group x if cut[x-1] <= value < cut[x].