X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fcorrelations.at;h=9a24da63f2287ce6847a9f83599e40d0e605aab1;hb=8e6f8bf3152f9ed166769b32f542b98991db4a4f;hp=1de7eed195f11c4a8ff2291f3dbd9e311c60e655;hpb=55c55aa33d0f90d1b3b58f8b33b3fc54062c553e;p=pspp diff --git a/tests/language/stats/correlations.at b/tests/language/stats/correlations.at index 1de7eed195..9a24da63f2 100644 --- a/tests/language/stats/correlations.at +++ b/tests/language/stats/correlations.at @@ -1,3 +1,19 @@ +dnl PSPP - a program for statistical analysis. +dnl Copyright (C) 2017 Free Software Foundation, Inc. +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl AT_BANNER([CORRELATIONS]) AT_SETUP([CORRELATIONS -- unweighted]) @@ -15,36 +31,37 @@ begin data. 5 3 0 . end data. -correlations +correlations variables = foo bar wiz bang /print nosig /missing = listwise . -correlations +correlations variables = bar wiz /print nosig /missing = listwise . -correlations +correlations variables = foo bar wiz bang /print nosig /missing = pairwise . ]) -AT_CHECK([pspp -o pspp.csv correlations.sps]) -AT_CHECK([cat pspp.csv], [0], [dnl -Table: Correlations +AT_CHECK([pspp -o pspp.csv -o pspp.txt correlations.sps]) +AT_CHECK([cat pspp.csv], [0], +[[Table: Correlations ,,foo,bar,wiz,bang -foo,Pearson Correlation,1.000,.802,.890,-.308 +foo,Pearson Correlation,1.000,.802,.890[a],-.308 ,Sig. (2-tailed),,.055,.017,.553 bar,Pearson Correlation,.802,1.000,.519,.118 ,Sig. (2-tailed),.055,,.291,.824 -wiz,Pearson Correlation,.890,.519,1.000,-.344 +wiz,Pearson Correlation,.890[a],.519,1.000,-.344 ,Sig. (2-tailed),.017,.291,,.505 bang,Pearson Correlation,-.308,.118,-.344,1.000 ,Sig. (2-tailed),.553,.824,.505, +Footnote: a. Significant at .05 level Table: Correlations ,,bar,wiz @@ -55,19 +72,20 @@ wiz,Pearson Correlation,.497,1.000 Table: Correlations ,,foo,bar,wiz,bang -foo,Pearson Correlation,1.000,.805,.883,-.308 +foo,Pearson Correlation,1.000,.805[a],.883[a],-.308 ,Sig. (2-tailed),,.029,.008,.553 ,N,7,7,7,6 -bar,Pearson Correlation,.805,1.000,.497,.164 +bar,Pearson Correlation,.805[a],1.000,.497,.164 ,Sig. (2-tailed),.029,,.210,.725 ,N,7,8,8,7 -wiz,Pearson Correlation,.883,.497,1.000,-.337 +wiz,Pearson Correlation,.883[a],.497,1.000,-.337 ,Sig. (2-tailed),.008,.210,,.460 ,N,7,8,8,7 bang,Pearson Correlation,-.308,.164,-.337,1.000 ,Sig. (2-tailed),.553,.725,.460, ,N,6,7,7,7 -]) +Footnote: a. Significant at .05 level +]]) AT_CLEANUP AT_SETUP([CORRELATIONS -- weighted]) @@ -85,7 +103,7 @@ end data. weight by w. -correlations +correlations variables = foo bar wiz bang /statistics=descriptives xprod . @@ -107,7 +125,7 @@ end data. weight by w. -correlations +correlations variables = foo bar wiz bang /statistics=descriptives xprod . @@ -124,14 +142,14 @@ set format = F11.3. data list notable list /foo * bar * wiz *. begin data. 1 1 6 -2 2 5 +2 2 5 3 3 4 4 4 3 5 5 2 6 6 1 end data. -correlations +correlations variables = foo with bar wiz . ]) @@ -176,15 +194,15 @@ AT_CHECK([pspp -o pspp.csv correlations.sps]) AT_CHECK([sed '/a,Pearson/,$s/,\([[^,]]*\),.*/,\1,.../' pspp.csv], [0], [dnl Table: Descriptive Statistics ,Mean,Std. Deviation,N -a,24.00,8.93,14.00 -f,4.73,.85,12.00 -b,14.50,6.41,14.00 -c,21.71,4.98,14.00 -g,24.86,6.09,14.00 -h,23.57,6.30,14.00 -i,27.79,6.73,14.00 -e,27.21,4.95,14.00 -d,27.93,5.23,14.00 +a,24.00,8.93,14 +f,4.73,.85,12 +b,14.50,6.41,14 +c,21.71,4.98,14 +g,24.86,6.09,14 +h,23.57,6.30,14 +i,27.79,6.73,14 +e,27.21,4.95,14 +d,27.93,5.23,14 Table: Correlations ,,c,g,h,i,e,d @@ -206,6 +224,7 @@ dnl Checks for bug #40661 AT_SETUP([CORRELATIONS -- incorrect subtable selection]) AT_DATA([correlations.sps], [dnl set format = F12.4. +OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [[CORRELATIONS]] FORMAT=F12.4. set decimal = dot. data list notable list /var1 var2 var3 var4 var5 *. begin data. @@ -321,31 +340,34 @@ CORRELATION ]) -AT_CHECK([pspp -O format=csv correlations.sps], [0], -[Table: Correlations +AT_CHECK([pspp -o pspp.csv -o pspp.txt correlations.sps]) +AT_CHECK([cat pspp.csv], [0], +[[Table: Correlations ,,var4,var5 -var1,Pearson Correlation,.5693,-.0519 +var1,Pearson Correlation,.5693[a],-.0519 ,Sig. (2-tailed),.000,.623 ,N,93,92 -var2,Pearson Correlation,.3792,-.0407 +var2,Pearson Correlation,.3792[a],-.0407 ,Sig. (2-tailed),.000,.698 ,N,95,93 -var3,Pearson Correlation,.3699,-.0543 +var3,Pearson Correlation,.3699[a],-.0543 ,Sig. (2-tailed),.000,.603 ,N,95,94 +Footnote: a. Significant at .05 level Table: Correlations ,,var1,var2 -var3,Pearson Correlation,.6964,.5615 +var3,Pearson Correlation,.6964[a],.5615[a] ,Sig. (2-tailed),.000,.000 ,N,96,97 -var4,Pearson Correlation,.5693,.3792 +var4,Pearson Correlation,.5693[a],.3792[a] ,Sig. (2-tailed),.000,.000 ,N,93,95 var5,Pearson Correlation,-.0519,-.0407 ,Sig. (2-tailed),.623,.698 ,N,92,93 -]) +Footnote: a. Significant at .05 level +]]) AT_CLEANUP