dnl PSPP - a program for statistical analysis.
dnl Copyright (C) 2017 Free Software Foundation, Inc.
-dnl
+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
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
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl
AT_DATA([npar.sps], [dnl
DATA LIST NOTABLE LIST /x * y * w * .
BEGIN DATA.
-1 2 1
+1 2 1
2 1 3
3.1 1 4
3.2 2 1
AT_DATA([npar.sps], [dnl
DATA LIST NOTABLE LIST /x * y * w * .
BEGIN DATA.
-1 2 1
+1 2 1
2 1 3
3.1 1 4
3.2 2 1
12.00 .00 1
12.00 .00 1
34.2 . 1
-12.00 1.00 1
+12.00 1.00 1
13.00 1.00 1
end data
data list notable list /age * height rank *.
begin data.
10 12 11
-12 13 13
+12 13 13
13 14 12
12 12 10
9 9 10
.
])
AT_CHECK([pspp -o pspp.csv npar.sps])
-dnl Some machines return .313 instead of .312
+dnl Some machines return .313 instead of .312
dnl (see bug #31611).
AT_CHECK([sed -e 's/\.313$/.312/' -e 's/^Exact Sig\. (1-tailed),\.313/Exact Sig. (1-tailed),.312/' pspp.csv], [0], [dnl
Table: Frequencies
1 101
2 82
2 124
-3 149
+3 149
3 166
3 147
end data.
2 135
2 109
3 115
-3 149
+3 149
3 166
3 147
2.5 344
begin data
1 96 .
1 128 .
-1 83 .
+1 83 .
2 132 132
2 135 135
2 109 109
3 115 115
-1 61 .
+1 61 .
1 101 .
-2 82 82
+2 82 82
2 124 124
3 149 149
3 166 166
4 "bowled"
5 "lbw"
.
-
+
npar tests
/k-w xscore yscore by gv (1, 5)
.
begin data
4 6
. 4
-4 3
-3 20
-2 29
-1 42
-6 18
-5 7
-6 78
-5 10
-6 46
-5 5
-6 17
-5 1
-6 11
-4 2
-3 7
-2 6
-1 10
-4 13
-3 22
-3 11
-2 24
-1 18
-4 4
-3 12
-2 10
-1 25
-4 4
-3 7
-2 3
-1 4
-4 2
-3 3
-2 2
-1 4
+4 3
+3 20
+2 29
+1 42
+6 18
+5 7
+6 78
+5 10
+6 46
+5 5
+6 17
+5 1
+6 11
+4 2
+3 7
+2 6
+1 10
+4 13
+3 22
+3 11
+2 24
+1 18
+4 4
+3 12
+2 10
+1 25
+4 4
+3 7
+2 3
+1 4
+4 2
+3 3
+2 2
+1 4
end data.
weight by w.
npar tests
/runs (MEDIAN) = score
/runs (MEAN) = score
- /runs (MODE) = score
+ /runs (MODE) = score
.
])
Total Cases,486.0000
Number of Runs,12
Z,-20.9931
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
Table: Runs Test
,score
Total Cases,486.0000
Number of Runs,12
Z,-21.0650
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
Table: Runs Test
,score
Total Cases,486.0000
Number of Runs,11
Z,-21.0742
-Asymp. Sig. (2-tailed),2.000
+Asymp. Sig. (2-tailed),.000
])
AT_CLEANUP
data list notable list /height * sex (f1.0).
begin data.
-201 1
-84 1
-83 1
-94 1
-88 0
-99 0
-55 0
-69 0
-86 1
-79 1
-91 0
-201 0
-88 1
-85 1
-82 1
-88 0
-75 0
-99 0
-81 0
-72 1
-89 1
-92 1
-80 0
-82 0
-76 0
-65 0
-85 0
-76 1
-145 1
+201 1
+84 1
+83 1
+94 1
+88 0
+99 0
+55 0
+69 0
+86 1
+79 1
+91 0
+201 0
+88 1
+85 1
+82 1
+88 0
+75 0
+99 0
+81 0
+72 1
+89 1
+92 1
+80 0
+82 0
+76 0
+65 0
+85 0
+76 1
+145 1
24 1
1 4
-4 5
21 4
end data.
-NPAR TESTS
+NPAR TESTS
/M-W = height BY sex (0,1).
])
I002_02 'IOS: Freunde'
I002_03 'IOS: Partner*in'
I002_04 'IOS: Bekannte'.
-
+
MISSING VALUES I002_01 I002_02 I002_03 I002_04 (-9 -1).
NPAR TESTS
data list notable list /v1 * v2 * v3 * v4 * v5 * v6 * v7 *.
begin data.
-2 1 1 2 1 1 2
-2 2 2 2 1 1 1
-1 1 2 2 1 1 2
-2 2 2 2 1 1 2
-2 1 2 1 1 2 1
-1 2 2 1 1 1 1
-1 2 2 2 2 2 2
-2 2 1 2 1 1 1
-1 2 1 2 1 1 2
-end data.
-
-npar tests
+2 1 1 2 1 1 2
+2 2 2 2 1 1 1
+1 1 2 2 1 1 2
+2 2 2 2 1 1 2
+2 1 2 1 1 2 1
+1 2 2 1 1 1 1
+1 2 2 2 2 2 2
+2 2 1 2 1 1 1
+1 2 1 2 1 1 2
+end data.
+
+npar tests
/cochran = v1 to v7 .
])
data list notable list /v1 * v2 * v3
begin data.
- 7 7 2
- 5 6 5
- 8 6 4
- 5 7 4
- 5 4 4
- 8 6 5
- 6 3 5
- 7 6 5
+ 7 7 2
+ 5 6 5
+ 8 6 4
+ 5 7 4
+ 5 4 4
+ 8 6 5
+ 6 3 5
+ 7 6 5
8 5 5
- . 2 2
- 5 4 5
- 3 4 4
- 5 1 2
- 5 2 1
- 7 6 5
- 6 3 4
- 6 6 6
- 5 4 5
- 4 3 4
- 9 1 1
- 6 2 1
- 3 7 8
- 6 3 4
- 4 4 4
- 5 4 3
- 6 5 2
- 4 4 8
- 4 6 4
- 6 5 5
- 7 8 6
- 5 3 5
+ . 2 2
+ 5 4 5
+ 3 4 4
+ 5 1 2
+ 5 2 1
+ 7 6 5
+ 6 3 4
+ 6 6 6
+ 5 4 5
+ 4 3 4
+ 9 1 1
+ 6 2 1
+ 3 7 8
+ 6 3 4
+ 4 4 4
+ 5 4 3
+ 6 5 2
+ 4 4 8
+ 4 6 4
+ 6 5 5
+ 7 8 6
+ 5 3 5
end data.
npar tests
1 1 1
end data.
-npar tests
+npar tests
/mcnemar = v1 WITH v2 junk.
])
AT_CLEANUP
+AT_SETUP([NPAR TESTS McNemar Symetricity])
+
+AT_DATA([mcnemar.sps], [dnl
+data list notable list /var1 var2 w (F2.0).
+begin data
+0 0 9
+0 1 8
+1 0 1
+1 1 5
+end data.
+
+weight by w.
+
+NPAR TEST
+ /MCNEMAR var1 WITH var2 (PAIRED).
+
+NPAR TEST
+ /MCNEMAR var2 WITH var1 (PAIRED).
+])
+
+AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
+Table: var1 & var2
+,var2,
+var1,0,1
+0,9,8
+1,1,5
+
+Table: Test Statistics
+,N,Exact Sig. (2-tailed),Exact Sig. (1-tailed),Point Probability
+var1 & var2,23,.039,.020,.02
+
+Table: var2 & var1
+,var1,
+var2,0,1
+0,9,1
+1,8,5
+
+Table: Test Statistics
+,N,Exact Sig. (2-tailed),Exact Sig. (1-tailed),Point Probability
+var2 & var1,23,.039,.020,.02
+])
+
+AT_CLEANUP
+
AT_SETUP([NPAR TESTS Kolmogorov-Smirnov Uniform parameters given])
AT_DATA([ks-uniform.sps], [dnl
65 12.5
59 14.2
43 12.6
-57
-68
-79
-51
-62
-57
-73
-58
-58
-68
-75
-47
-70
-59
-71
-52
+57
+68
+79
+51
+62
+57
+73
+58
+58
+68
+75
+47
+70
+59
+71
+52
48 13.0
58 14.1
37 15.0
86 14.0
63 12.5
80 12.8
-70
-63
-53
-53
-48
-49
-51
-47
-81
-66
-78
+70
+63
+53
+53
+48
+49
+51
+47
+81
+66
+78
65
-69
+69
70 12.1
63 12.5
64 12.4
66 12.8
82 12.9
81 13.6
-46
-52
-71
-73
-58
-57
-46
-58
+46
+52
+71
+73
+58
+57
+46
+58
52 13.5
71 13.2
57 12.8
65 13.0
64 12.5
66 12.0
-55
-62
-58
-48
-67
-46
-36
-61
-55
-77
-74
-60
-70
-69
-57
-49
-63
-69
-63
-76
-53
-54
-42
-64
-66
-61
-62
-73
-73
-60
-79
-40
-48
-76
-60
-76
+55
+62
+58
+48
+67
+46
+36
+61
+55
+77
+74
+60
+70
+69
+57
+49
+63
+69
+63
+76
+53
+54
+42
+64
+66
+61
+62
+73
+73
+60
+79
+40
+48
+76
+60
+76
54
69
65
82
end data.
-npar tests
+npar tests
/k-s (normal) = foo bar.
])
AT_CLEANUP
-dnl Checks that (PAIRED) can have lists where the same
+dnl Checks that (PAIRED) can have lists where the same
dnl variable appears more than once.
AT_SETUP([NPAR TESTS (PAIRED)])
AT_DATA([npar.sps], [dnl
AT_CHECK([pspp -O format=csv npar.sps], [1], [ignore])
AT_CLEANUP
-
+