Class Ols.Fit

java.lang.Object
com.quantfinlib.alpha.Ols.Fit
Enclosing class:
Ols

public static final class Ols.Fit extends Object
  • Constructor Details

    • Fit

      public Fit(double[] coefficients, double[] standardErrors, double[] hacStandardErrors, int hacLag, double[] residuals, double rSquared)
      Creates the value; array and collection arguments are copied.
      Parameters:
      coefficients - fitted coefficients in design-matrix column order
      standardErrors - classical standard errors
      hacStandardErrors - Newey-West standard errors at hacLag
      hacLag - Bartlett lag used for the HAC errors
      residuals - y − Xb
      rSquared - 1 − SSR/SST (centred; 0 when y is constant)
  • Method Details

    • coefficients

      public double coefficients(int i)
      Element i of coefficients (fitted coefficients in design-matrix column order).
    • coefficientsLength

      public int coefficientsLength()
      Length of coefficients.
    • coefficientsCopy

      public double[] coefficientsCopy()
      A fresh copy of coefficients.
    • standardErrors

      public double standardErrors(int i)
      Element i of standardErrors (classical standard errors).
    • standardErrorsLength

      public int standardErrorsLength()
      Length of standardErrors.
    • standardErrorsCopy

      public double[] standardErrorsCopy()
      A fresh copy of standardErrors.
    • hacStandardErrors

      public double hacStandardErrors(int i)
      Element i of hacStandardErrors.
    • hacStandardErrorsLength

      public int hacStandardErrorsLength()
      Length of hacStandardErrors.
    • hacStandardErrorsCopy

      public double[] hacStandardErrorsCopy()
      A fresh copy of hacStandardErrors.
    • hacLag

      public int hacLag()
      hacLag (Bartlett lag used for the HAC errors).
    • residuals

      public double residuals(int i)
      Element i of residuals.
    • residualsLength

      public int residualsLength()
      Length of residuals.
    • residualsCopy

      public double[] residualsCopy()
      A fresh copy of residuals.
    • rSquared

      public double rSquared()
      rSquared.
    • tStat

      public double tStat(int j)
      Classical t-statistic of coefficient j.
    • hacTStat

      public double hacTStat(int j)
      HAC t-statistic of coefficient j.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object