| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>RegressionResults (Apache Commons Math 3.3 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="RegressionResults (Apache Commons Math 3.3 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/RegressionResults.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/commons/math3/stat/regression/OLSMultipleLinearRegression.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/commons/math3/stat/regression/SimpleRegression.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/commons/math3/stat/regression/RegressionResults.html" target="_top">Frames</a></li> |
| <li><a href="RegressionResults.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.commons.math3.stat.regression</div> |
| <h2 title="Class RegressionResults" class="title">Class RegressionResults</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.commons.math3.stat.regression.RegressionResults</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">RegressionResults</span> |
| extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> |
| <div class="block">Results of a Multiple Linear Regression model fit.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>3.0</dd> |
| <dt><span class="strong">Version:</span></dt> |
| <dd>$Id: RegressionResults.java 1392342 2012-10-01 14:08:52Z psteitz $</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../serialized-form.html#org.apache.commons.math3.stat.regression.RegressionResults">Serialized Form</a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#RegressionResults(double[], double[][], boolean, long, int, double, double, double, boolean, boolean)">RegressionResults</a></strong>(double[] parameters, |
| double[][] varcov, |
| boolean isSymmetricCompressed, |
| long nobs, |
| int rank, |
| double sumy, |
| double sumysq, |
| double sse, |
| boolean containsConstant, |
| boolean copyData)</code> |
| <div class="block">Constructor for Regression Results.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getAdjustedRSquared()">getAdjustedRSquared</a></strong>()</code> |
| <div class="block">Returns the adjusted R-squared statistic, defined by the formula</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getCovarianceOfParameters(int, int)">getCovarianceOfParameters</a></strong>(int i, |
| int j)</code> |
| <div class="block">Returns the covariance between regression parameters i and j.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getErrorSumSquares()">getErrorSumSquares</a></strong>()</code> |
| <div class="block">Returns the <a href="http://www.xycoon.com/SumOfSquares.htm"> |
| sum of squared errors</a> (SSE) associated with the regression |
| model.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getMeanSquareError()">getMeanSquareError</a></strong>()</code> |
| <div class="block">Returns the sum of squared errors divided by the degrees of freedom, |
| usually abbreviated MSE.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getN()">getN</a></strong>()</code> |
| <div class="block">Returns the number of observations added to the regression model.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getNumberOfParameters()">getNumberOfParameters</a></strong>()</code> |
| <div class="block">Returns the number of parameters estimated in the model.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getParameterEstimate(int)">getParameterEstimate</a></strong>(int index)</code> |
| <div class="block">Returns the parameter estimate for the regressor at the given index.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getParameterEstimates()">getParameterEstimates</a></strong>()</code> |
| <div class="block">Returns a copy of the regression parameters estimates.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getRegressionSumSquares()">getRegressionSumSquares</a></strong>()</code> |
| <div class="block">Returns the sum of squared deviations of the predicted y values about |
| their mean (which equals the mean of y).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getRSquared()">getRSquared</a></strong>()</code> |
| <div class="block">Returns the <a href="http://www.xycoon.com/coefficient1.htm"> |
| coefficient of multiple determination</a>, |
| usually denoted r-square.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getStdErrorOfEstimate(int)">getStdErrorOfEstimate</a></strong>(int index)</code> |
| <div class="block">Returns the <a href="http://www.xycoon.com/standerrorb(1).htm">standard |
| error of the parameter estimate at index</a>, |
| usually denoted s(b<sub>index</sub>).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getStdErrorOfEstimates()">getStdErrorOfEstimates</a></strong>()</code> |
| <div class="block">Returns the <a href="http://www.xycoon.com/standerrorb(1).htm">standard |
| error of the parameter estimates</a>, |
| usually denoted s(b<sub>i</sub>).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getTotalSumSquares()">getTotalSumSquares</a></strong>()</code> |
| <div class="block">Returns the sum of squared deviations of the y values about their mean.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#hasIntercept()">hasIntercept</a></strong>()</code> |
| <div class="block">Returns true if the regression model has been computed including an intercept.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="RegressionResults(double[], double[][], boolean, long, int, double, double, double, boolean, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>RegressionResults</h4> |
| <pre>public RegressionResults(double[] parameters, |
| double[][] varcov, |
| boolean isSymmetricCompressed, |
| long nobs, |
| int rank, |
| double sumy, |
| double sumysq, |
| double sse, |
| boolean containsConstant, |
| boolean copyData)</pre> |
| <div class="block">Constructor for Regression Results.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>parameters</code> - a double array with the regression slope estimates</dd><dd><code>varcov</code> - the variance covariance matrix, stored either in a square matrix |
| or as a compressed</dd><dd><code>isSymmetricCompressed</code> - a flag which denotes that the variance covariance |
| matrix is in symmetric compressed format</dd><dd><code>nobs</code> - the number of observations of the regression estimation</dd><dd><code>rank</code> - the number of independent variables in the regression</dd><dd><code>sumy</code> - the sum of the independent variable</dd><dd><code>sumysq</code> - the sum of the squared independent variable</dd><dd><code>sse</code> - sum of squared errors</dd><dd><code>containsConstant</code> - true model has constant, false model does not have constant</dd><dd><code>copyData</code> - if true a deep copy of all input data is made, if false only references |
| are copied and the RegressionResults become mutable</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getParameterEstimate(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getParameterEstimate</h4> |
| <pre>public double getParameterEstimate(int index) |
| throws <a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block"><p>Returns the parameter estimate for the regressor at the given index.</p> |
| |
| <p>A redundant regressor will have its redundancy flag set, as well as |
| a parameters estimated equal to <code>Double.NaN</code></p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - Index.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the parameters estimated for regressor at index.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>index</code> is not in the interval |
| <code>[0, number of parameters)</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getParameterEstimates()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getParameterEstimates</h4> |
| <pre>public double[] getParameterEstimates()</pre> |
| <div class="block"><p>Returns a copy of the regression parameters estimates.</p> |
| |
| <p>The parameter estimates are returned in the natural order of the data.</p> |
| |
| <p>A redundant regressor will have its redundancy flag set, as will |
| a parameter estimate equal to <code>Double.NaN</code>.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>array of parameter estimates, null if no estimation occurred</dd></dl> |
| </li> |
| </ul> |
| <a name="getStdErrorOfEstimate(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStdErrorOfEstimate</h4> |
| <pre>public double getStdErrorOfEstimate(int index) |
| throws <a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Returns the <a href="http://www.xycoon.com/standerrorb(1).htm">standard |
| error of the parameter estimate at index</a>, |
| usually denoted s(b<sub>index</sub>).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - Index.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the standard errors associated with parameters estimated at index.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>index</code> is not in the interval |
| <code>[0, number of parameters)</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getStdErrorOfEstimates()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStdErrorOfEstimates</h4> |
| <pre>public double[] getStdErrorOfEstimates()</pre> |
| <div class="block"><p>Returns the <a href="http://www.xycoon.com/standerrorb(1).htm">standard |
| error of the parameter estimates</a>, |
| usually denoted s(b<sub>i</sub>).</p> |
| |
| <p>If there are problems with an ill conditioned design matrix then the regressor |
| which is redundant will be assigned <code>Double.NaN</code>. </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>an array standard errors associated with parameters estimates, |
| null if no estimation occurred</dd></dl> |
| </li> |
| </ul> |
| <a name="getCovarianceOfParameters(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCovarianceOfParameters</h4> |
| <pre>public double getCovarianceOfParameters(int i, |
| int j) |
| throws <a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block"><p>Returns the covariance between regression parameters i and j.</p> |
| |
| <p>If there are problems with an ill conditioned design matrix then the covariance |
| which involves redundant columns will be assigned <code>Double.NaN</code>. </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - <code>i</code>th regression parameter.</dd><dd><code>j</code> - <code>j</code>th regression parameter.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the covariance of the parameter estimates.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>i</code> or <code>j</code> is not in the |
| interval <code>[0, number of parameters)</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getNumberOfParameters()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumberOfParameters</h4> |
| <pre>public int getNumberOfParameters()</pre> |
| <div class="block"><p>Returns the number of parameters estimated in the model.</p> |
| |
| <p>This is the maximum number of regressors, some techniques may drop |
| redundant parameters</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>number of regressors, -1 if not estimated</dd></dl> |
| </li> |
| </ul> |
| <a name="getN()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getN</h4> |
| <pre>public long getN()</pre> |
| <div class="block">Returns the number of observations added to the regression model.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>Number of observations, -1 if an error condition prevents estimation</dd></dl> |
| </li> |
| </ul> |
| <a name="getTotalSumSquares()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTotalSumSquares</h4> |
| <pre>public double getTotalSumSquares()</pre> |
| <div class="block"><p>Returns the sum of squared deviations of the y values about their mean.</p> |
| |
| <p>This is defined as SSTO |
| <a href="http://www.xycoon.com/SumOfSquares.htm">here</a>.</p> |
| |
| <p>If <code>n < 2</code>, this returns <code>Double.NaN</code>.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>sum of squared deviations of y values</dd></dl> |
| </li> |
| </ul> |
| <a name="getRegressionSumSquares()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRegressionSumSquares</h4> |
| <pre>public double getRegressionSumSquares()</pre> |
| <div class="block"><p>Returns the sum of squared deviations of the predicted y values about |
| their mean (which equals the mean of y).</p> |
| |
| <p>This is usually abbreviated SSR or SSM. It is defined as SSM |
| <a href="http://www.xycoon.com/SumOfSquares.htm">here</a></p> |
| |
| <p><strong>Preconditions</strong>: <ul> |
| <li>At least two observations (with at least two different x values) |
| must have been added before invoking this method. If this method is |
| invoked before a model can be estimated, <code>Double.NaN</code> is |
| returned. |
| </li></ul></p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>sum of squared deviations of predicted y values</dd></dl> |
| </li> |
| </ul> |
| <a name="getErrorSumSquares()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getErrorSumSquares</h4> |
| <pre>public double getErrorSumSquares()</pre> |
| <div class="block"><p>Returns the <a href="http://www.xycoon.com/SumOfSquares.htm"> |
| sum of squared errors</a> (SSE) associated with the regression |
| model.</p> |
| |
| <p>The return value is constrained to be non-negative - i.e., if due to |
| rounding errors the computational formula returns a negative result, |
| 0 is returned.</p> |
| |
| <p><strong>Preconditions</strong>: <ul> |
| <li>numberOfParameters data pairs |
| must have been added before invoking this method. If this method is |
| invoked before a model can be estimated, <code>Double,NaN</code> is |
| returned. |
| </li></ul></p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>sum of squared errors associated with the regression model</dd></dl> |
| </li> |
| </ul> |
| <a name="getMeanSquareError()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMeanSquareError</h4> |
| <pre>public double getMeanSquareError()</pre> |
| <div class="block"><p>Returns the sum of squared errors divided by the degrees of freedom, |
| usually abbreviated MSE.</p> |
| |
| <p>If there are fewer than <strong>numberOfParameters + 1</strong> data pairs in the model, |
| or if there is no variation in <code>x</code>, this returns |
| <code>Double.NaN</code>.</p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>sum of squared deviations of y values</dd></dl> |
| </li> |
| </ul> |
| <a name="getRSquared()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRSquared</h4> |
| <pre>public double getRSquared()</pre> |
| <div class="block"><p>Returns the <a href="http://www.xycoon.com/coefficient1.htm"> |
| coefficient of multiple determination</a>, |
| usually denoted r-square.</p> |
| |
| <p><strong>Preconditions</strong>: <ul> |
| <li>At least numberOfParameters observations (with at least numberOfParameters different x values) |
| must have been added before invoking this method. If this method is |
| invoked before a model can be estimated, <code>Double,NaN</code> is |
| returned. |
| </li></ul></p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>r-square, a double in the interval [0, 1]</dd></dl> |
| </li> |
| </ul> |
| <a name="getAdjustedRSquared()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAdjustedRSquared</h4> |
| <pre>public double getAdjustedRSquared()</pre> |
| <div class="block"><p>Returns the adjusted R-squared statistic, defined by the formula <pre> |
| R<sup>2</sup><sub>adj</sub> = 1 - [SSR (n - 1)] / [SSTO (n - p)] |
| </pre> |
| where SSR is the sum of squared residuals}, |
| SSTO is the total sum of squares}, n is the number |
| of observations and p is the number of parameters estimated (including the intercept).</p> |
| |
| <p>If the regression is estimated without an intercept term, what is returned is <pre> |
| <code> 1 - (1 - <a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getRSquared()"><code>getRSquared()</code></a> ) * (n / (n - p)) </code> |
| </pre></p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>adjusted R-Squared statistic</dd></dl> |
| </li> |
| </ul> |
| <a name="hasIntercept()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hasIntercept</h4> |
| <pre>public boolean hasIntercept()</pre> |
| <div class="block">Returns true if the regression model has been computed including an intercept. |
| In this case, the coefficient of the intercept is the first element of the |
| <a href="../../../../../../org/apache/commons/math3/stat/regression/RegressionResults.html#getParameterEstimates()"><code>parameter estimates</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if the model has an intercept term</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/RegressionResults.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/commons/math3/stat/regression/OLSMultipleLinearRegression.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/commons/math3/stat/regression/SimpleRegression.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/commons/math3/stat/regression/RegressionResults.html" target="_top">Frames</a></li> |
| <li><a href="RegressionResults.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2003–2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |