Open lschwetlick opened 5 days ago
@FelixWichmann : do you think this statistically possible and due to the imprecision of estimating the confidence intervals using the percentile method or is it the sign of a bug?
@guillermoaguilar : could you test if matlab shows he same effect using the same data?
@FelixWichmann : do you think this statistically possible and due to the imprecision of estimating the confidence intervals using the percentile method or is it the sign of a bug? To me rather a sign of a bug, I'm afraid.
@guillermoaguilar : could you test if matlab shows he same effect using the same data? Indeed -- what does MATLAB show?
Sorry but I won't be able to look into psignifit issues until Friday late afternoon/weekend. Please let me know if the problem persists.
Cheers, Felix
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
I ran the same data in MATLAB, it does give different results, the estimate is inside the CI. The MATLAB version estimates a much shallower function, and if you look at the marginals they are indeed different between the two implementations.
Here the plots from MATLAB and python (in that order) for the psychometric function:
the marginal for the threshold:
the marginal for the width:
Now I have to say there are many things that make this a very special case
data = [[14. 14. 30.], [24. 8. 30.], [34. 28. 30.], [44. 29. 30.]]
And another thought: in this example only the 68% CI does not include the estimate, for 95% and 90% CI it does. It is expected that a 68%CI does not include the estimate in 32% of the time, no? From the definition of the CI.
For me what is more worrying is that the threshold and slope are different, and it seems it comes from how the marginals are computed, as they're different.
What do you think @FelixWichmann?
Just for completation here the MATLAB code: example_ci_error.zip
And another thought: in this example only the 68% CI does not include the estimate, for 95% and 90% CI it does. It is expected that a 68%CI does not include the estimate in 32% of the time, no? From the definition of the CI.
Nevermind this, I had a Denkfehler. For coverage we calculate how many times the ground truth value is inside the CI. The estimate should be always inside the CI.
See the title.
See here for an example: https://gist.github.com/lschwetlick/b6168ed60668076e0d0c510811c40fd3
This is only the case if you use the
percentiles
CI method.