Skip to content
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

Issue with computing quantiles for skew-normal #145

Closed
jzmaddock opened this issue Jul 31, 2018 · 0 comments
Closed

Issue with computing quantiles for skew-normal #145

jzmaddock opened this issue Jul 31, 2018 · 0 comments

Comments

@jzmaddock
Copy link
Collaborator

The 0.075 skew-normal quantile breaks (returns an inf) with certain, seemingly reasonable parameters. Other surrounding values are okay. The complemented version works for some reason.

Here's some test code

#include <iostream>
#include <boost/math/distributions.hpp> 

int main()
{
    boost::math::skew_normal_distribution<> dist(2.0, 1.0, -2.5);

    std::vector<double> qs = { 0.05, 0.075, 0.1 };
    for(auto q : qs) {
        std::cout << "q : " << q << std::endl;
        std::cout << "w/o complement: " << quantile(dist, q) << std::endl;
        std::cout << "w complement: " << quantile(complement(dist, 1 - q)) << std::endl << std::endl;
    }
}

Dunno how easy this is to fix. I can work around it where I'm using it, but it seems like something that could be fixed.

Thanks!

Moved from Trac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant