org.apache.commons.math3.stat.correlation
Class CovarianceTest

java.lang.Object
  extended by org.apache.commons.math3.stat.correlation.CovarianceTest

public class CovarianceTest
extends Object


Field Summary
protected  double[] longleyData
           
protected  double[] swissData
           
 
Constructor Summary
CovarianceTest()
           
 
Method Summary
protected  RealMatrix createRealMatrix(double[] data, int nRows, int nCols)
           
 void testConsistency()
          Verify that diagonal entries are consistent with Variance computation and matrix matches column-by-column covariances
 void testConstant()
          Constant column
 void testInsufficientData()
          Insufficient data
 void testLongly()
          Test Longley dataset against R.
 void testOneColumn()
          One column
 void testSwissFertility()
          Test R Swiss fertility dataset against R.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

longleyData

protected final double[] longleyData

swissData

protected final double[] swissData
Constructor Detail

CovarianceTest

public CovarianceTest()
Method Detail

testLongly

public void testLongly()
Test Longley dataset against R. 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. 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


testConstant

public void testConstant()
Constant column


testOneColumn

public void testOneColumn()
One column


testInsufficientData

public void testInsufficientData()
Insufficient data


testConsistency

public void testConsistency()
Verify that diagonal entries are consistent with Variance computation and matrix matches column-by-column covariances


createRealMatrix

protected RealMatrix createRealMatrix(double[] data,
                                      int nRows,
                                      int nCols)


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