[ 
https://issues.apache.org/jira/browse/MATH-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503910#comment-13503910
 ] 

Patrick Meyer commented on MATH-909:
------------------------------------

According to the R documentation, the gamma and beta functions are C 
translations of the SLATEC Fortran subroutines, as you suspected. The 
incomplete gamma appears to have a different origin. According to the R 
documentation, the pbeta function is related to the incomplete beta function of 
Abramowitz and Stegun. They cite two different sources for the function 
depending on whether it is a central or non-central pbeta.

Central pbeta:

Didonato, A. and Morris, A., Jr, (1992) Algorithm 708: Significant digit 
computation of the incomplete beta function ratios, ACM Transactions on 
Mathematical Software, 18, 360–373. (See also
Brown, B. and Lawrence Levy, L. (1994) Certification of algorithm 708: 
Significant digit computation of the incomplete beta, ACM Transactions on 
Mathematical Software, 20, 393–397.)

Non-central pbeta:

Lenth, R. V. (1987) Algorithm AS226: Computing noncentral beta probabilities. 
Appl. Statist, 36, 241–244, incorporating
Frick, H. (1990)'s AS R84, Appl. Statist, 39, 311–2, and
Lam, M.L. (1995)'s AS R95, Appl. Statist, 44, 551–2.

As far as test cases go, I think we should include a test case, given the 
proposed work on the underlying incomplete beta function. The test case does 
not have to be specific to this issue, but it would be safe to include a test.





                
> FDistribution NoBracketingException in BrentSolver
> --------------------------------------------------
>
>                 Key: MATH-909
>                 URL: https://issues.apache.org/jira/browse/MATH-909
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Patrick Meyer
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I get an exception when running the code below. the exception is 
> {code}
> function values at endpoints do not have different signs, endpoints: [0, 
> 1.002], values: [-0.025, -∞]
> {code}
> The problematic code:
> {code}
> double df1 = 10675;
> double df2 = 501725;
> FDistribution fDist = new FDistribution(df1, df2);
> System.out.println(fDist.inverseCumulativeProbability(0.025));//NoBracketingException
> {code}
> However, R returns the value 0.9733505. The R code is:
> {code}
> qf(p=.025, df1=10675, df2=501725)
> {code}
> I don't know enough about the FDistribution class to know the solution to the 
> exception, but I thought I would report it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to