Class Ols.Fit
java.lang.Object
com.quantfinlib.alpha.Ols.Fit
- Enclosing class:
Ols
-
Constructor Summary
ConstructorsConstructorDescriptionFit(double[] coefficients, double[] standardErrors, double[] hacStandardErrors, int hacLag, double[] residuals, double rSquared) Creates the value; array and collection arguments are copied. -
Method Summary
Modifier and TypeMethodDescriptiondoublecoefficients(int i) Elementiofcoefficients(fitted coefficients in design-matrix column order).double[]A fresh copy ofcoefficients.intLength ofcoefficients.booleaninthacLag()hacLag(Bartlett lag used for the HAC errors).doublehacStandardErrors(int i) ElementiofhacStandardErrors.double[]A fresh copy ofhacStandardErrors.intLength ofhacStandardErrors.doublehacTStat(int j) HAC t-statistic of coefficientj.inthashCode()doubleresiduals(int i) Elementiofresiduals.double[]A fresh copy ofresiduals.intLength ofresiduals.doublerSquared()rSquared.doublestandardErrors(int i) ElementiofstandardErrors(classical standard errors).double[]A fresh copy ofstandardErrors.intLength ofstandardErrors.toString()doubletStat(int j) Classical t-statistic of coefficientj.
-
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 orderstandardErrors- classical standard errorshacStandardErrors- Newey-West standard errors athacLaghacLag- Bartlett lag used for the HAC errorsresiduals-y − XbrSquared-1 − SSR/SST(centred; 0 when y is constant)
-
-
Method Details
-
coefficients
public double coefficients(int i) Elementiofcoefficients(fitted coefficients in design-matrix column order). -
coefficientsLength
public int coefficientsLength()Length ofcoefficients. -
coefficientsCopy
public double[] coefficientsCopy()A fresh copy ofcoefficients. -
standardErrors
public double standardErrors(int i) ElementiofstandardErrors(classical standard errors). -
standardErrorsLength
public int standardErrorsLength()Length ofstandardErrors. -
standardErrorsCopy
public double[] standardErrorsCopy()A fresh copy ofstandardErrors. -
hacStandardErrors
public double hacStandardErrors(int i) ElementiofhacStandardErrors. -
hacStandardErrorsLength
public int hacStandardErrorsLength()Length ofhacStandardErrors. -
hacStandardErrorsCopy
public double[] hacStandardErrorsCopy()A fresh copy ofhacStandardErrors. -
hacLag
public int hacLag()hacLag(Bartlett lag used for the HAC errors). -
residuals
public double residuals(int i) Elementiofresiduals. -
residualsLength
public int residualsLength()Length ofresiduals. -
residualsCopy
public double[] residualsCopy()A fresh copy ofresiduals. -
rSquared
public double rSquared()rSquared. -
tStat
public double tStat(int j) Classical t-statistic of coefficientj. -
hacTStat
public double hacTStat(int j) HAC t-statistic of coefficientj. -
equals
-
hashCode
-
toString
-