Author: psteitz
Date: Mon Feb 16 13:52:33 2009
New Revision: 744918

URL: http://svn.apache.org/viewvc?rev=744918&view=rev
Log:
Increased sensitivity of test and added another p-value verification.

Modified:
    commons/proper/math/trunk/src/test/R/correlationTestCases

Modified: commons/proper/math/trunk/src/test/R/correlationTestCases
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/correlationTestCases?rev=744918&r1=744917&r2=744918&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/R/correlationTestCases (original)
+++ commons/proper/math/trunk/src/test/R/correlationTestCases Mon Feb 16 
13:52:33 2009
@@ -22,7 +22,7 @@
 # source("<name-of-this-file>")
 #
 #------------------------------------------------------------------------------
-tol <- 1E-9                       # error tolerance for tests
+tol <- 1E-15                      # error tolerance for tests
 #------------------------------------------------------------------------------
 # Function definitions
 
@@ -172,14 +172,20 @@
   42.8,27.7,22,29,58.33),
   nrow = 47, ncol = 5, byrow = TRUE)
    
- expectedCorrelation <- matrix(c(
+expectedCorrelation <- matrix(c(
          1.0000000000000000, 0.3530791836199747, -0.6458827064572875, 
-0.6637888570350691,  0.4636847006517939,
          0.3530791836199747, 1.0000000000000000,-0.6865422086171366, 
-0.6395225189483201, 0.4010950530487398,
          -0.6458827064572875, -0.6865422086171366, 1.0000000000000000, 
0.6984152962884830, -0.5727418060641666,
          -0.6637888570350691, -0.6395225189483201, 0.6984152962884830, 
1.0000000000000000, -0.1538589170909148,
           0.4636847006517939, 0.4010950530487398, -0.5727418060641666, 
-0.1538589170909148, 1.0000000000000000),
           nrow = 5, ncol = 5, byrow = TRUE)
-      
 verifyCorrelation(fertility, expectedCorrelation, "swiss fertility")
 
-displayDashes(WIDTH)
\ No newline at end of file
+expectedPValues <- c(
+          0.01491720061472623,
+          9.45043734069043e-07, 9.95151527133974e-08,
+          3.658616965962355e-07, 1.304590105694471e-06, 4.811397236181847e-08,
+          0.001028523190118147, 0.005204433539191644, 2.588307925380906e-05, 
0.301807756132683)
+verifyPValues(fertility, expectedPValues, "swiss fertility")
+
+displayDashes(WIDTH)


Reply via email to