org.apache.commons.math3.stat.regression
Class OLSMultipleLinearRegressionTest

java.lang.Object
  extended by org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest
      extended by org.apache.commons.math3.stat.regression.OLSMultipleLinearRegressionTest

public class OLSMultipleLinearRegressionTest
extends MultipleLinearRegressionAbstractTest


Field Summary
 
Fields inherited from class org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest
regression
 
Constructor Summary
OLSMultipleLinearRegressionTest()
           
 
Method Summary
 void cannotAddSampleDataWithSizeMismatch()
           
protected  void checkVarianceConsistency(OLSMultipleLinearRegression model)
          Verifies that calculateYVariance and calculateResidualVariance return consistent values with direct variance computation from Y, residuals, respectively.
protected  OLSMultipleLinearRegression createRegression()
           
protected  int getNumberOfRegressors()
           
protected  int getSampleSize()
           
 void setUp()
           
 void testHat()
          Test hat matrix computation
 void testLongly()
          Test Longley dataset against certified values provided by NIST.
 void testNewSample2()
          Verifies that setting X and Y separately has the same effect as newSample(X,Y).
 void testNewSampleDataXNull()
           
 void testNewSampleDataYNull()
           
 void testPerfectFit()
           
 void testSwissFertility()
          Test R Swiss fertility dataset against R.
 void testWampler1()
           
 void testWampler2()
           
 void testWampler3()
           
 void testWampler4()
           
 void testYVariance()
          test calculateYVariance
 
Methods inherited from class org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest
canEstimateRegressandVariance, canEstimateRegressionParameters, canEstimateRegressionParametersVariance, canEstimateResiduals, testNewSample, testNewSampleInsufficientData, testNewSampleInvalidData, testNewSampleNullData, testXSampleDataNull, testYSampleDataNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OLSMultipleLinearRegressionTest

public OLSMultipleLinearRegressionTest()
Method Detail

setUp

public void setUp()
Overrides:
setUp in class MultipleLinearRegressionAbstractTest

createRegression

protected OLSMultipleLinearRegression createRegression()
Specified by:
createRegression in class MultipleLinearRegressionAbstractTest

getNumberOfRegressors

protected int getNumberOfRegressors()
Specified by:
getNumberOfRegressors in class MultipleLinearRegressionAbstractTest

getSampleSize

protected int getSampleSize()
Specified by:
getSampleSize in class MultipleLinearRegressionAbstractTest

cannotAddSampleDataWithSizeMismatch

public void cannotAddSampleDataWithSizeMismatch()

testPerfectFit

public void testPerfectFit()

testLongly

public void testLongly()
Test Longley dataset against certified values provided by NIST. Data Source: J. Longley (1967) "An Appraisal of Least Squares Programs for the Electronic Computer from the Point of View of the User" Journal of the American Statistical Association, vol. 62. September, pp. 819-841. Certified values (and data) are from NIST: http://www.itl.nist.gov/div898/strd/lls/data/LINKS/DATA/Longley.dat


testSwissFertility

public void testSwissFertility()
Test R Swiss fertility dataset against R. Data Source: R datasets package


testHat

public void testHat()
Test hat matrix computation


testYVariance

public void testYVariance()
test calculateYVariance


checkVarianceConsistency

protected void checkVarianceConsistency(OLSMultipleLinearRegression model)
Verifies that calculateYVariance and calculateResidualVariance return consistent values with direct variance computation from Y, residuals, respectively.


testNewSample2

public void testNewSample2()
Verifies that setting X and Y separately has the same effect as newSample(X,Y).


testNewSampleDataYNull

public void testNewSampleDataYNull()

testNewSampleDataXNull

public void testNewSampleDataXNull()

testWampler1

public void testWampler1()

testWampler2

public void testWampler2()

testWampler3

public void testWampler3()

testWampler4

public void testWampler4()


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.