1 AT_BANNER([CORRELATIONS])
3 AT_SETUP([CORRELATIONS -- unweighted])
4 AT_DATA([correlations.sps], [dnl
6 data list notable list /foo * bar * wiz * bang *.
19 variables = foo bar wiz bang
31 variables = foo bar wiz bang
36 AT_CHECK([pspp -o pspp.csv correlations.sps])
37 AT_CHECK([cat pspp.csv], [0], [dnl
40 foo,Pearson Correlation,1.000,.802,.890,-.308
41 ,Sig. (2-tailed),,.055,.017,.553
42 bar,Pearson Correlation,.802,1.000,.519,.118
43 ,Sig. (2-tailed),.055,,.291,.824
44 wiz,Pearson Correlation,.890,.519,1.000,-.344
45 ,Sig. (2-tailed),.017,.291,,.505
46 bang,Pearson Correlation,-.308,.118,-.344,1.000
47 ,Sig. (2-tailed),.553,.824,.505,
51 bar,Pearson Correlation,1.000,.497
52 ,Sig. (2-tailed),,.210
53 wiz,Pearson Correlation,.497,1.000
54 ,Sig. (2-tailed),.210,
58 foo,Pearson Correlation,1.000,.805,.883,-.308
59 ,Sig. (2-tailed),,.029,.008,.553
61 bar,Pearson Correlation,.805,1.000,.497,.164
62 ,Sig. (2-tailed),.029,,.210,.725
64 wiz,Pearson Correlation,.883,.497,1.000,-.337
65 ,Sig. (2-tailed),.008,.210,,.460
67 bang,Pearson Correlation,-.308,.164,-.337,1.000
68 ,Sig. (2-tailed),.553,.725,.460,
73 AT_SETUP([CORRELATIONS -- weighted])
74 AT_DATA([correlations1.sps], [dnl
76 data list notable list /foo * bar * wiz * bang * w *.
89 variables = foo bar wiz bang
90 /statistics=descriptives xprod
93 AT_DATA([correlations2.sps], [dnl
95 data list notable list /foo * bar * wiz * bang * w *.
111 variables = foo bar wiz bang
112 /statistics=descriptives xprod
115 AT_CHECK([pspp -O format=csv correlations1.sps], [0], [stdout])
117 AT_CHECK([pspp -O format=csv correlations2.sps], [0], [expout])
121 AT_SETUP([CORRELATIONS -- non-square])
122 AT_DATA([corr-ns.sps], [dnl
124 data list notable list /foo * bar * wiz *.
135 variables = foo with bar wiz
139 AT_CHECK([pspp -O format=csv corr-ns.sps], [0], [dnl
142 foo,Pearson Correlation,1.000,-1.000
143 ,Sig. (2-tailed),,.000
149 dnl Checks for bug #38661.
150 AT_SETUP([CORRELATIONS -- crash with WITH keyword])
151 AT_DATA([correlations.sps], [dnl
152 DATA LIST LIST NOTABLE /a b c d e f g h i.
155 20 21 17 28 23 4.35 24 19 25
156 28 18 29 30 23 4.55 17 23 28
157 47 18 30 30 29 4.35 26 31 31
158 20 7 19 22 22 4.80 24 16 27
159 19 12 17 27 22 . 22 14 25
160 22 9 19 30 33 5 29 30 27
161 41 16 22 32 23 3.90 26 27 23
162 18 18 20 26 22 5.80 17 20 39
163 18 24 25 25 31 5.15 27 27 34
164 19 22 26 23 37 6 41 32 27
165 23 12 15 29 25 4.10 21 27 20
166 21 4 28 37 31 5.65 27 18 42
167 19 5 17 17 29 3.10 19 16 19
168 21 17 20 35 31 . 28 30 22
171 CORRELATIONS VARIABLE=a f b WITH c g h i e d/STATISTICS=DESCRIPTIVES.
173 AT_CHECK([pspp -o pspp.csv correlations.sps])
174 # Check the output, ignoring the actual correlations values since
175 # they look pretty nonsensical to me for this input (they include NaNs).
176 AT_CHECK([sed '/a,Pearson/,$s/,\([[^,]]*\),.*/,\1,.../' pspp.csv], [0], [dnl
177 Table: Descriptive Statistics
178 ,Mean,Std. Deviation,N
191 a,Pearson Correlation,...
194 f,Pearson Correlation,...
197 b,Pearson Correlation,...