public abstract class AbstractMultipleLinearRegression extends java.lang.Object implements MultipleLinearRegression
| Constructor and Description |
|---|
AbstractMultipleLinearRegression() |
| Modifier and Type | Method and Description |
|---|---|
double |
estimateErrorVariance()
Estimates the variance of the error.
|
double |
estimateRegressandVariance()
Returns the variance of the regressand, ie Var(y).
|
double[] |
estimateRegressionParameters()
Estimates the regression parameters b.
|
double[] |
estimateRegressionParametersStandardErrors()
Returns the standard errors of the regression parameters.
|
double[][] |
estimateRegressionParametersVariance()
Estimates the variance of the regression parameters, ie Var(b).
|
double |
estimateRegressionStandardError()
Estimates the standard error of the regression.
|
double[] |
estimateResiduals()
Estimates the residuals, ie u = y - X*b.
|
boolean |
isNoIntercept() |
void |
newSampleData(double[] data,
int nobs,
int nvars)
Loads model x and y sample data from a flat input array, overriding any previous sample.
|
void |
setNoIntercept(boolean noIntercept) |
public boolean isNoIntercept()
public void setNoIntercept(boolean noIntercept)
noIntercept - true means the model is to be estimated without an intercept termpublic void newSampleData(double[] data,
int nobs,
int nvars)
Loads model x and y sample data from a flat input array, overriding any previous sample.
Assumes that rows are concatenated with y values first in each row. For example, an input
data array containing the sequence of values (1, 2, 3, 4, 5, 6, 7, 8, 9) with
nobs = 3 and nvars = 2 creates a regression dataset with two
independent variables, as below:
y x[0] x[1] -------------- 1 2 3 4 5 6 7 8 9
Note that there is no need to add an initial unitary column (column of 1's) when
specifying a model including an intercept term. If isNoIntercept() is true,
the X matrix will be created without an initial column of "1"s; otherwise this column will
be added.
Throws IllegalArgumentException if any of the following preconditions fail:
data cannot be nulldata.length = nobs * (nvars + 1)nobs > nvarsdata - input data arraynobs - number of observations (rows)nvars - number of independent variables (columns, not counting y)java.lang.IllegalArgumentException - if the preconditions are not metpublic double[] estimateRegressionParameters()
estimateRegressionParameters in interface MultipleLinearRegressionpublic double[] estimateResiduals()
estimateResiduals in interface MultipleLinearRegressionpublic double[][] estimateRegressionParametersVariance()
estimateRegressionParametersVariance in interface MultipleLinearRegressionpublic double[] estimateRegressionParametersStandardErrors()
estimateRegressionParametersStandardErrors in interface MultipleLinearRegressionpublic double estimateRegressandVariance()
estimateRegressandVariance in interface MultipleLinearRegressionpublic double estimateErrorVariance()
public double estimateRegressionStandardError()
Copyright © 2010 - 2023 Adobe. All Rights Reserved