Menu

#41 GEV CDF formula issue

1.0
closed
nobody
None
2021-05-18
2021-03-12
Anonymous
No

In file src/main/java/jdistlib/evd/GEV.java the formula

q = shape == 0 ? exp(-exp(-q)) : pow(exp(max(1 + shape * q, 0)), -1.0/shape);

is not correct, and should instead be

q = shape == 0 ? exp(-exp(-q)) : exp(-pow(max(1 + shape * q, 0), -1.0/shape));

The formula can be found in https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution.

Discussion

  • Roby Joehanes

    Roby Joehanes - 2021-04-21

    Hi there, sorry for the really late reply, but I checked the code here:
    https://sourceforge.net/p/jdistlib/code/ci/master/tree/JDistLib/src/main/java/jdistlib/evd/GEV.java#l45

    And I believe it is correct, just as you mentioned.
    q = shape == 0 ? exp(-exp(-q)) : exp(-pow(max(1 + shape * q, 0), -1.0/shape));

    I haven't changed that code since 2017. Did you get the code elsewhere or did I miss anything? Thanks!

     
  • Roby Joehanes

    Roby Joehanes - 2021-05-18
    • status: open --> closed
     
  • Roby Joehanes

    Roby Joehanes - 2021-05-18

    Alright then, I would consider this not a bug.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB