Package hec.lang
Class RegressionFromConstant
java.lang.Object
hec.lang.RegressionFromConstant
Title: RegressionFromConstant - Computes a simple regression given a fixed constant
Description:
Company:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected booleanprotected doubleprotected intprotected double[]protected doubleprotected doubleprotected double[]protected double[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic double[]computeRegression(int nv, double[] x, double[] y, double c) protected voidcreateArrays(int nv) doubledouble[]doublegetSlope()doublestatic voidvoidsetConstant(double constant) voidsetNumOrds(int n) voidsetX(double[] x) voidsetY(double[] y)
-
Field Details
-
numOrds
protected int numOrds -
constant
protected double constant -
x
protected double[] x -
y
protected double[] y -
slope
protected double slope -
coeffOfDetermination
protected double coeffOfDetermination -
stdErrorOfRegression
protected double stdErrorOfRegression -
results
protected double[] results -
computed
protected boolean computed
-
-
Constructor Details
-
RegressionFromConstant
public RegressionFromConstant() -
RegressionFromConstant
public RegressionFromConstant(int nv, double[] x, double[] y, double constant)
-
-
Method Details
-
createArrays
protected void createArrays(int nv) -
setNumOrds
public void setNumOrds(int n) -
setConstant
public void setConstant(double constant) -
setX
public void setX(double[] x) -
setY
public void setY(double[] y) -
computeRegression
public int computeRegression() -
getSlope
public double getSlope() -
getStdErrOfRegression
public double getStdErrOfRegression() -
getCoeffOfDetermination
public double getCoeffOfDetermination() -
getResults
public double[] getResults() -
computeRegression
public static double[] computeRegression(int nv, double[] x, double[] y, double c) -
main
-