public interface UpdatingMultipleLinearRegression
Modifier and Type | Method and Description |
---|---|
void |
addObservation(double[] x,
double y)
Adds one observation to the regression model.
|
void |
addObservations(double[][] x,
double[] y)
Adds a series of observations to the regression model.
|
void |
clear()
Clears internal buffers and resets the regression model.
|
long |
getN()
Returns the number of observations added to the regression model.
|
boolean |
hasIntercept()
Returns true if a constant has been included false otherwise.
|
RegressionResults |
regress()
Performs a regression on data present in buffers and outputs a RegressionResults object
|
RegressionResults |
regress(int[] variablesToInclude)
Performs a regression on data present in buffers including only regressors
indexed in variablesToInclude and outputs a RegressionResults object
|
boolean hasIntercept()
long getN()
void addObservation(double[] x, double y) throws MathIllegalArgumentException
x
- the independent variables which form the design matrixy
- the dependent or response variableMathIllegalArgumentException
- if the length of x
does not equal
the number of independent variables in the modelvoid addObservations(double[][] x, double[] y) throws MathIllegalArgumentException
x
- a series of observations on the independent variablesy
- a series of observations on the dependent variable
The length of x and y must be the sameMathIllegalArgumentException
- if x
is not rectangular, does not match
the length of y
or does not contain sufficient data to estimate the modelvoid clear()
RegressionResults regress() throws MathIllegalArgumentException
MathIllegalArgumentException
- if the model is not correctly specifiedMathIllegalArgumentException
- if there is not sufficient data in the model to
estimate the regression parametersRegressionResults regress(int[] variablesToInclude) throws MathIllegalArgumentException
variablesToInclude
- an array of indices of regressors to includeMathIllegalArgumentException
- if the model is not correctly specifiedMathIllegalArgumentException
- if the variablesToInclude array is null or zero lengthCopyright © 2016-2021 CS GROUP. All rights reserved.