From commits-return-12126-apmail-commons-commits-archive=commons.apache.org@commons.apache.org Sun May 16 14:58:16 2010 Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 33778 invoked from network); 16 May 2010 14:58:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 May 2010 14:58:15 -0000 Received: (qmail 63436 invoked by uid 500); 16 May 2010 14:58:15 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 63372 invoked by uid 500); 16 May 2010 14:58:14 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 63365 invoked by uid 99); 16 May 2010 14:58:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 May 2010 14:58:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 May 2010 14:58:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 000CF23889B6; Sun, 16 May 2010 14:57:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r944842 - /commons/proper/math/trunk/src/test/R/correlationTestCases Date: Sun, 16 May 2010 14:57:50 -0000 To: commits@commons.apache.org From: psteitz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100516145751.000CF23889B6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: psteitz Date: Sun May 16 14:57:50 2010 New Revision: 944842 URL: http://svn.apache.org/viewvc?rev=944842&view=rev Log: Formatting only. 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=944842&r1=944841&r2=944842&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/R/correlationTestCases (original) +++ commons/proper/math/trunk/src/test/R/correlationTestCases Sun May 16 14:57:50 2010 @@ -85,8 +85,7 @@ verifyPValues <- function(matrix, pValue #-------------------------------------------------------------------------- cat("Correlation test cases\n") -# Longley - +# Longley ----------------------------------------------------------------- longley <- matrix(c(60323,83.0,234289,2356,1590,107608,1947, 61122,88.5,259426,2325,1456,108632,1948, 60171,88.2,258054,3682,1616,109773,1949, @@ -146,8 +145,7 @@ expectedCorrelation <- matrix(c( nrow = 7, ncol = 7, byrow = TRUE) verifySpearmansCorrelation(longley, expectedCorrelation, "longley") - # Swiss Fertility - + # Swiss Fertility --------------------------------------------------------- fertility <- matrix(c(80.2,17.0,15,12,9.96, 83.1,45.1,6,9,84.84, 92.5,39.7,5,5,93.40, @@ -196,6 +194,8 @@ expectedCorrelation <- matrix(c( 44.7,46.6,16,29,50.43, 42.8,27.7,22,29,58.33), nrow = 47, ncol = 5, byrow = TRUE) + +# Pearson's expectedCorrelation <- matrix(c( 1, 0.3530791836199747, -0.6458827064572875, -0.663788857035069, 0.463684700651794, 0.3530791836199747, 1, -0.6865422086171366, -0.63952251894832, 0.4010950530487398,