commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "greg sterijevski (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MATH-619) ADJUSTED R SQUARED INCORRECT IN REGRESSION RESULTS
Date Thu, 14 Jul 2011 05:33:59 GMT
ADJUSTED R SQUARED INCORRECT IN REGRESSION RESULTS
--------------------------------------------------

                 Key: MATH-619
                 URL: https://issues.apache.org/jira/browse/MATH-619
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.0
         Environment: Java
            Reporter: greg sterijevski
         Attachments: regres

I forgot to cast to double when dividing two integers:

            this.globalFitInfo[ADJRSQ_IDX] = 1.0 - 
                    (1.0 - this.globalFitInfo[RSQ_IDX]) *
                    (  nobs / ( (nobs - rank)));
Should be
            this.globalFitInfo[ADJRSQ_IDX] = 1.0 - 
                    (1.0 - this.globalFitInfo[RSQ_IDX]) *
                    ( (double) nobs / ( (double) (nobs - rank)));

Patch attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message