Use greater-than-or-equal to sign instead of '>='.
[pspp] / tests / language / stats / npar.at
index 02cc99d2899e0e918b6c2c7c27e25a46e62336cc..28e8e497db877c514a31807cb15737a9bd53753c 100644 (file)
@@ -526,13 +526,13 @@ AT_CHECK([pspp -o pspp.csv npar.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Ranks
 ,,N,Mean Rank,Sum of Ranks
-second - first,Negative Ranks,5,8.60,43.00
-,Positive Ranks,8,6.00,48.00
+first - second,Negative Ranks,8,6.00,48.00
+,Positive Ranks,5,8.60,43.00
 ,Ties,2,,
 ,Total,15,,
 
 Table: Test Statistics
-,second - first
+,first - second
 Z,-.18
 Asymp. Sig. (2-tailed),.86
 Exact Sig. (2-tailed),.89
@@ -575,13 +575,13 @@ dnl This is the same output as the previous test.
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Ranks
 ,,N,Mean Rank,Sum of Ranks
-second - first,Negative Ranks,5,8.60,43.00
-,Positive Ranks,8,6.00,48.00
+first - second,Negative Ranks,8,6.00,48.00
+,Positive Ranks,5,8.60,43.00
 ,Ties,2,,
 ,Total,15,,
 
 Table: Test Statistics
-,second - first
+,first - second
 Z,-.18
 Asymp. Sig. (2-tailed),.86
 Exact Sig. (2-tailed),.89
@@ -610,20 +610,22 @@ npar tests
        .
 ])
 AT_CHECK([pspp -o pspp.csv npar.sps])
-AT_CHECK([cat pspp.csv], [0], [dnl
+dnl Some machines return .313 instead of .312 for the Point Probability
+dnl (see bug #31611).
+AT_CHECK([sed 's/\.313$/.312/' pspp.csv], [0], [dnl
 Table: Frequencies
 ,,N
-height - age,Negative Differences,1
-,Positive Differences,3
+age - height,Negative Differences,3
+,Positive Differences,1
 ,Ties,2
 ,Total,6
-rank - height,Negative Differences,3
-,Positive Differences,2
+height - rank,Negative Differences,2
+,Positive Differences,3
 ,Ties,1
 ,Total,6
 
 Table: Test Statistics
-,height - age,rank - height
+,age - height,height - rank
 Exact Sig. (2-tailed),.625,1.000
 Exact Sig. (1-tailed),.312,.500
 Point Probability,.250,.312
@@ -852,7 +854,7 @@ Table: Runs Test
 ,score
 Test Value (median),3.0000
 Cases < Test Value,177.0000
-Cases >= Test Value,309.0000
+Cases  Test Value,309.0000
 Total Cases,486.0000
 Number of Runs,12
 Z,-20.9931
@@ -862,7 +864,7 @@ Table: Runs Test
 ,score
 Test Value (mean),3.6379
 Cases < Test Value,259.0000
-Cases >= Test Value,227.0000
+Cases  Test Value,227.0000
 Total Cases,486.0000
 Number of Runs,12
 Z,-21.0650
@@ -872,7 +874,7 @@ Table: Runs Test
 ,score
 Test Value (mode),6.0000
 Cases < Test Value,316.0000
-Cases >= Test Value,170.0000
+Cases  Test Value,170.0000
 Total Cases,486.0000
 Number of Runs,11
 Z,-21.0742
@@ -1026,3 +1028,123 @@ Asymp. Sig.,.047
 ])
 
 AT_CLEANUP
+
+
+
+AT_SETUP([NPAR TESTS Kendall])
+AT_DATA([npar-kendall.sps], [dnl
+SET FORMAT F14.3.
+
+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 
+ 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 
+end data.
+
+npar tests
+       /kendall = all
+       .
+])
+
+AT_CHECK([pspp -o pspp.csv npar-kendall.sps])
+
+AT_CHECK([cat pspp.csv], [0], [dnl
+Table: Ranks
+,Mean Rank
+v1,2.500
+v2,1.817
+v3,1.683
+
+Table: Test Statistics
+N,30
+Kendall's W,.233
+Chi-Square,13.960
+df,2
+Asymp. Sig.,.001
+])
+
+AT_CLEANUP
+
+
+
+AT_SETUP([NPAR TESTS McNemar])
+
+AT_DATA([mcnemar.sps], [dnl
+set format = F12.3.
+data list notable list /v1 * v2 * junk *.
+begin data.
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 1 0
+0 1 0
+0 1 0
+0 1 0
+0 1 1
+0 1 1
+0 1 1
+0 1 1
+0 1 1
+1 0 1
+1 0 1
+1 1 1
+1 1 1
+1 1 0
+1 1 0
+1 1 1
+end data.
+
+npar tests 
+     /mcnemar = v1 WITH v2 junk.
+])
+
+AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
+Table: v1 & v2
+v1,v2,
+,.000,1.000
+.000,4,9
+1.000,2,5
+
+Table: v1 & junk
+v1,junk,
+,.000,1.000
+.000,8,5
+1.000,2,5
+
+Table: Test Statistics
+,N,Exact Sig. (2-tailed),Exact Sig. (1-tailed),Point Probability
+v1 & v2,20,.065,.033,.027
+v1 & junk,20,.453,.227,.164
+])
+
+AT_CLEANUP