diff --git a/src/site/xdoc/userguide/stat.xml b/src/site/xdoc/userguide/stat.xml
index e63b56fe8..6ad146af4 100644
--- a/src/site/xdoc/userguide/stat.xml
+++ b/src/site/xdoc/userguide/stat.xml
@@ -473,37 +473,47 @@ System.out.println(regression.getSlopeStdErr());
-
- MultipleLinearRegression provides ordinary least squares regression
- with a generic multiple variable linear model, which in matrix notation
- can be expressed as:
+
+ OLSMultipleLinearRegression and
+
+ GLSMultipleLinearRegression provide least squares regression to fit the linear model:
-
- where y is an
- Two implementations are provided:
- OLSMultipleLinearRegression and
+
+ OLSMultipleLinearRegression provides Ordinary Least Squares Regression, and
- GLSMultipleLinearRegression
+ GLSMultipleLinearRegression implements Generalized Least Squares. See the javadoc for these
+ classes for details on the algorithms and forumlas used.
- Observations (x,y and covariance data matrices) can be added to the model via the
Usage Notes: y=X*b+u
+ Y=X*b+u
n-vector
regressand, X is a [n,k]
matrix whose k
columns are called
- regressors, b is k-vector
of regression parameters and u
is an n-vector
- of error terms or residuals. The notation is quite standard in literature,
- cf eg Davidson and MacKinnon, Econometrics Theory and Methods, 2004.
+ where Y is an n-vector regressand, X is a [n,k] matrix whose k columns are called
+ regressors, b is k-vector of regression parameters and u is an n-vector
+ of error terms or residuals.
addData(double[] y, double[][] x, double[][] covariance)
method.
- The observations are stored in memory until the next time the addData method is invoked.
+ Data for OLS models can be loaded in a single double[] array, consisting of concatenated rows of data, each containing
+ the regressand (Y) value, followed by regressor values; or using a double[][] array with rows corresponding to
+ observations. GLS models also require a double[][] array representing the covariance matrix of the error terms. See
+
+ AbstractMultipleLinearRegression#newSampleData(double[],int,int),
+
+ OLSMultipleLinearRegression#newSampleData(double[], double[][]) and
+
+ GLSMultipleLinearRegression#newSampleData(double[],double[][],double[][]) for details.
-
addData(double[] y, double[][] x, double[][] covariance)
method and
- IllegalArgumentException
is thrown when inappropriate.
+ IllegalArgumentException
is thrown when input data arrays do not have matching dimensions
+ or do not contain sufficient data to estimate the model.
null
.noIntercept
property to true.
@@ -511,44 +521,48 @@ System.out.println(regression.getSlopeStdErr());
MultipleLinearRegression
interface:
+ MultipleLinearRegression
interface as
- the OLS regression.
-