X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Flanguage%2Fstats%2Fmeans.at;h=72f98b3d1ff8718bccab8d517c55ee58ca9bac2b;hb=a58399ea2ce9421f72cc5771cd215b121bd8f9dd;hp=c6e298b5afc27ba3b99d2a933049c3ca507eb474;hpb=6a8d0d2d8bf801c21d71d6c3317ab97d110175cf;p=pspp diff --git a/tests/language/stats/means.at b/tests/language/stats/means.at index c6e298b5af..72f98b3d1f 100644 --- a/tests/language/stats/means.at +++ b/tests/language/stats/means.at @@ -441,36 +441,36 @@ score * a * b * c,9,100.0%,0,.0%,9,100.0% Table: Report a,b,c,Mean,N,Std. Deviation -fooberrycrumblexzaQ ,fosilationwereqd,one ,4.00,1,NaN -,,two ,41.00,1,NaN -,,zero ,3.00,1,NaN +fooberrycrumblexzaQ,fosilationwereqd,one,4.00,1,NaN +,,two,41.00,1,NaN +,,zero,3.00,1,NaN ,,Total,16.00,3,21.66 -,onlyonekonboys ,one ,6.00,1,NaN -,,zero ,5.00,1,NaN +,onlyonekonboys,one,6.00,1,NaN +,,zero,5.00,1,NaN ,,Total,5.50,2,.71 -,Total,one ,5.00,2,1.41 -,,two ,41.00,1,NaN -,,zero ,4.00,2,1.41 +,Total,one,5.00,2,1.41 +,,two,41.00,1,NaN +,,zero,4.00,2,1.41 ,,Total,11.80,5,16.36 -wontledingbatsXASDF ,fosilationwereqd,one ,8.00,1,NaN -,,zero ,7.00,1,NaN +wontledingbatsXASDF,fosilationwereqd,one,8.00,1,NaN +,,zero,7.00,1,NaN ,,Total,7.50,2,.71 -,onlyonekonboys ,one ,10.00,1,NaN -,,zero ,9.00,1,NaN +,onlyonekonboys,one,10.00,1,NaN +,,zero,9.00,1,NaN ,,Total,9.50,2,.71 -,Total,one ,9.00,2,1.41 -,,zero ,8.00,2,1.41 +,Total,one,9.00,2,1.41 +,,zero,8.00,2,1.41 ,,Total,8.50,4,1.29 -Total,fosilationwereqd,one ,6.00,2,2.83 -,,two ,41.00,1,NaN -,,zero ,5.00,2,2.83 +Total,fosilationwereqd,one,6.00,2,2.83 +,,two,41.00,1,NaN +,,zero,5.00,2,2.83 ,,Total,12.60,5,16.01 -,onlyonekonboys ,one ,8.00,2,2.83 -,,zero ,7.00,2,2.83 +,onlyonekonboys,one,8.00,2,2.83 +,,zero,7.00,2,2.83 ,,Total,7.50,4,2.38 -,Total,one ,7.00,4,2.58 -,,two ,41.00,1,NaN -,,zero ,6.00,4,2.58 +,Total,one,7.00,4,2.58 +,,two,41.00,1,NaN +,,zero,6.00,4,2.58 ,,Total,10.33,9,11.73 ]) @@ -685,7 +685,7 @@ AT_SETUP([MEANS multi combination]) AT_KEYWORDS([categorical categoricals]) AT_DATA([means-multi-combination.sps], [dnl -data list notable list /one two three four five six. +data list notable list /one (F22.5) two (F22.5) three four five six. begin data 1 1 1 1 1 1 2 1 1 1 1 1 @@ -758,8 +758,6 @@ recode five (2 = 52) (1 = 51). recode four (2 = 42) (1 = 41). recode three (2 = 32) (1 = 31). -set format F22.5. - means tables = one two BY three four BY five six. ]) @@ -1044,4 +1042,83 @@ Total,17,22.00 AT_CLEANUP +dnl Make sure that behaviour with SPLIT is correct. +AT_SETUP([MEANS split]) +AT_KEYWORDS([categorical categoricals]) + +AT_DATA([means-split.sps], [dnl +data list notable list /b g *. +begin data +2 0 +2 0 +4 0 +4 0 +11 1 +11 1 +end data. + +split file by g. + +means b /cells = count mean. +]) + +AT_CHECK([pspp -O format=csv means-split.sps], [0], [dnl +Table: Case Processing Summary +,Cases,,,,, +,Included,,Excluded,,Total, +,N,Percent,N,Percent,N,Percent +b,4,100.0%,0,.0%,4,100.0% + +Table: Report +N,Mean +4,3.00 + +Table: Case Processing Summary +,Cases,,,,, +,Included,,Excluded,,Total, +,N,Percent,N,Percent,N,Percent +b,2,100.0%,0,.0%,2,100.0% + +Table: Report +N,Mean +2,11.00 +]) + +AT_CLEANUP + + +dnl Test the output with unusual dependent variable formats +AT_SETUP([MEANS formats]) +AT_KEYWORDS([categorical categoricals]) + +AT_DATA([means-formats.sps], [dnl +data list notable list /hours (TIME11.0) rate (DOLLAR8.2). +begin data +12:00 4.09 +14:01 5.23 +end data. + +means hours rate + /cells = mean count max range. +]) + +AT_CHECK([pspp -O format=csv means-formats.sps], [0], [dnl +Table: Case Processing Summary +,Cases,,,,, +,Included,,Excluded,,Total, +,N,Percent,N,Percent,N,Percent +hours,2,100.0%,0,.0%,2,100.0% +rate,2,100.0%,0,.0%,2,100.0% + +Table: hours * rate +,hours,rate +Mean,13:00:30,$4.66 +N,2,2 +Maximum,14:01:00,$5.23 +Range,02:01:00,$1.14 +]) + +AT_CLEANUP + +