Repository: commons-math
Updated Branches:
  refs/heads/MATH_3_X a9006aa8b -> 607511fd6


Fixed errors in multiple regression code samples. JIRA: MATH-1316.  Thanks to 
Sanghack Lee.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/607511fd
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/607511fd
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/607511fd

Branch: refs/heads/MATH_3_X
Commit: 607511fd6b1116920ea0aaa4371405a317cc8e11
Parents: a9006aa
Author: Phil Steitz <phil.ste...@gmail.com>
Authored: Mon Jan 11 06:52:30 2016 -0700
Committer: Phil Steitz <phil.ste...@gmail.com>
Committed: Mon Jan 11 06:52:30 2016 -0700

----------------------------------------------------------------------
 src/site/xdoc/userguide/stat.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/607511fd/src/site/xdoc/userguide/stat.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/userguide/stat.xml b/src/site/xdoc/userguide/stat.xml
index 305795c..e315954 100644
--- a/src/site/xdoc/userguide/stat.xml
+++ b/src/site/xdoc/userguide/stat.xml
@@ -562,14 +562,14 @@ System.out.println(regression.getInterceptStdErr() );
           <source>
 OLSMultipleLinearRegression regression = new OLSMultipleLinearRegression();
 double[] y = new double[]{11.0, 12.0, 13.0, 14.0, 15.0, 16.0};
-double[] x = new double[6][];
+double[][] x = new double[6][];
 x[0] = new double[]{0, 0, 0, 0, 0};
 x[1] = new double[]{2.0, 0, 0, 0, 0};
 x[2] = new double[]{0, 3.0, 0, 0, 0};
 x[3] = new double[]{0, 0, 4.0, 0, 0};
 x[4] = new double[]{0, 0, 0, 5.0, 0};
 x[5] = new double[]{0, 0, 0, 0, 6.0};          
-regression.newSample(y, x);
+regression.newSampleData(y, x);
           </source>
           </dd>
           <dd>Get regression parameters and diagnostics:
@@ -593,7 +593,7 @@ double sigma = regression.estimateRegressionStandardError();
           <source>
 GLSMultipleLinearRegression regression = new GLSMultipleLinearRegression();
 double[] y = new double[]{11.0, 12.0, 13.0, 14.0, 15.0, 16.0};
-double[] x = new double[6][];
+double[][] x = new double[6][];
 x[0] = new double[]{0, 0, 0, 0, 0};
 x[1] = new double[]{2.0, 0, 0, 0, 0};
 x[2] = new double[]{0, 3.0, 0, 0, 0};

Reply via email to