Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-392

calculateYVariance in OLS/GLSMultipleLinearRegression uses residuals not Y vars

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      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.

        Attachments

        1. patch
          5 kB
          Mark Devaney

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              markdevaney Mark Devaney
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: