Increased sensitivity of test and added another p-value verification.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@744918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64fa01cd78
commit
4cc86649f4
|
@ -22,7 +22,7 @@
|
||||||
# source("<name-of-this-file>")
|
# source("<name-of-this-file>")
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
tol <- 1E-9 # error tolerance for tests
|
tol <- 1E-15 # error tolerance for tests
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Function definitions
|
# Function definitions
|
||||||
|
|
||||||
|
@ -172,14 +172,20 @@ expectedCorrelation <- matrix(c(
|
||||||
42.8,27.7,22,29,58.33),
|
42.8,27.7,22,29,58.33),
|
||||||
nrow = 47, ncol = 5, byrow = TRUE)
|
nrow = 47, ncol = 5, byrow = TRUE)
|
||||||
|
|
||||||
expectedCorrelation <- matrix(c(
|
expectedCorrelation <- matrix(c(
|
||||||
1.0000000000000000, 0.3530791836199747, -0.6458827064572875, -0.6637888570350691, 0.4636847006517939,
|
1.0000000000000000, 0.3530791836199747, -0.6458827064572875, -0.6637888570350691, 0.4636847006517939,
|
||||||
0.3530791836199747, 1.0000000000000000,-0.6865422086171366, -0.6395225189483201, 0.4010950530487398,
|
0.3530791836199747, 1.0000000000000000,-0.6865422086171366, -0.6395225189483201, 0.4010950530487398,
|
||||||
-0.6458827064572875, -0.6865422086171366, 1.0000000000000000, 0.6984152962884830, -0.5727418060641666,
|
-0.6458827064572875, -0.6865422086171366, 1.0000000000000000, 0.6984152962884830, -0.5727418060641666,
|
||||||
-0.6637888570350691, -0.6395225189483201, 0.6984152962884830, 1.0000000000000000, -0.1538589170909148,
|
-0.6637888570350691, -0.6395225189483201, 0.6984152962884830, 1.0000000000000000, -0.1538589170909148,
|
||||||
0.4636847006517939, 0.4010950530487398, -0.5727418060641666, -0.1538589170909148, 1.0000000000000000),
|
0.4636847006517939, 0.4010950530487398, -0.5727418060641666, -0.1538589170909148, 1.0000000000000000),
|
||||||
nrow = 5, ncol = 5, byrow = TRUE)
|
nrow = 5, ncol = 5, byrow = TRUE)
|
||||||
|
|
||||||
verifyCorrelation(fertility, expectedCorrelation, "swiss fertility")
|
verifyCorrelation(fertility, expectedCorrelation, "swiss fertility")
|
||||||
|
|
||||||
|
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)
|
displayDashes(WIDTH)
|
Loading…
Reference in New Issue