You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Devaney (JIRA)" <ji...@apache.org> on 2010/07/21 20:43:51 UTC

[jira] Created: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
-------------------------------------------------------------------------------

                 Key: MATH-392
                 URL: https://issues.apache.org/jira/browse/MATH-392
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 2.1
            Reporter: Mark Devaney
            Priority: Minor


Implementation of OLS/GLSMultipleLinearRegression is:
@Override
173        protected double calculateYVariance() {
174            RealVector residuals = calculateResiduals();
175            return residuals.dotProduct(residuals) /
176                   (X.getRowDimension() - X.getColumnDimension());
177        }

This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892406#action_12892406 ] 

Luc Maisonobe commented on MATH-392:
------------------------------------

There was an error in a file committed this afternoon. It should be OK now.

> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>             Fix For: 2.2
>
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated MATH-392:
-----------------------------

    Fix Version/s: 2.2

> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>             Fix For: 2.2
>
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Mark Devaney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892352#action_12892352 ] 

Mark Devaney commented on MATH-392:
-----------------------------------

Can't test a patch as I'm not able to build current repository version:
math/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java:[28,39] cannot find symbol
symbol  : class SincFunction

Implementation for both GLS/OLS:

protected double calculateYVariance() {
    return new Variance().evaluate(Y);
}


> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>             Fix For: 2.2
>
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892247#action_12892247 ] 

Phil Steitz commented on MATH-392:
----------------------------------

Thank you for reporting this.  Patches welcome!

> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Mark Devaney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Devaney updated MATH-392:
------------------------------

    Attachment: patch

corrected implementations of calculateYVariance() for OLS/GLSMultipleRegression

added unit tests for both calculateYVariance implementations

fixed AbstractMultipleRegression.estimateRegressionParametersStandardErrors() to use residuals 

> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>             Fix For: 2.2
>
>         Attachments: patch
>
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MATH-392) calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz resolved MATH-392.
------------------------------

    Resolution: Fixed

Fixed in 987897.   I added calcluate/estimateErrorVariance methods to return what was previously incorrectly reported as "Y variance."
Thanks for the patch!

> calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars
> -------------------------------------------------------------------------------
>
>                 Key: MATH-392
>                 URL: https://issues.apache.org/jira/browse/MATH-392
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Mark Devaney
>            Priority: Minor
>             Fix For: 2.2
>
>         Attachments: patch
>
>
> Implementation of OLS/GLSMultipleLinearRegression is:
> @Override
> 173        protected double calculateYVariance() {
> 174            RealVector residuals = calculateResiduals();
> 175            return residuals.dotProduct(residuals) /
> 176                   (X.getRowDimension() - X.getColumnDimension());
> 177        }
> This gives variance of residuals not variance of the dependent (Y) variable as the documentation suggests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.