-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add noncentral hypergeometric distribution #255
Conversation
Distinction between central and minlike Fisher test --- There are mulitple ways to define a p-value for the Fisher, or more general, for 2 x 2 table test. In order to implement strongly consistent confidence intervals w.r.t the corresponding test, we need to invert the corresponding test. Unfortunately, inverting the minlike test does not necessarily lead to an interval. Thus, the default version should be the central p-value with the corresponding interval. Noncentral hypergeometric distribution --- We need Fisher's noncentral hypergeometric distribution to compute confidence intervals. See JuliaStats/Distributions.jl#255.
Distinction between central and minlike Fisher test --- There are mulitple ways to define a p-value for the Fisher, or more general, for 2 x 2 table test. In order to implement strongly consistent confidence intervals w.r.t the corresponding test, we need to invert the corresponding test. Unfortunately, inverting the minlike test does not necessarily lead to an interval. Thus, the default version should be the central p-value with the corresponding interval. Noncentral hypergeometric distribution --- We need Fisher's noncentral hypergeometric distribution to compute confidence intervals. See JuliaStats/Distributions.jl#255.
## Properties | ||
binomial(n::Int64, kR::UnitRange{Int64}) = [binomial(n,k) for k in kR] | ||
function logP(d::FisherNoncentralHypergeometric, k) | ||
y = support(d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between logP
and logpdf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logP is perhaps not the right name. It is actually a helper function (see the box right in http://en.wikipedia.org/wiki/Fisher%27s_noncentral_hypergeometric_distribution) used, e.g., for calculating the mean.
There are two noncentral hypergeometric distributions (Fisher and Wallenius). Fisher's distribution is used for tests based on contigency tables as the Fisher exact test (necessary for e.g. computing confidence intervals).
Add noncentral hypergeometric distribution
Thanks! |
There are two noncentral hypergeometric distributions (Fisher and
Wallenius). Fisher's distribution is used for tests based on contigency
tables as the Fisher exact test (necessary for e.g. computing confidence
intervals).