X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Flanguage%2Fstats%2Fcrosstabs.at;h=53a7335de9fa8bdf31a53afce43f48945ad7f1a4;hb=77e55f812e8f01d3c9bc82f02f9edd7333a8013e;hp=de13f1b6b12e651e72ed1cc47d67dacf679be2c9;hpb=0200682d517fd4b7cfc4e333378de03bcf74be43;p=pspp diff --git a/tests/language/stats/crosstabs.at b/tests/language/stats/crosstabs.at index de13f1b6b1..53a7335de9 100644 --- a/tests/language/stats/crosstabs.at +++ b/tests/language/stats/crosstabs.at @@ -16,6 +16,67 @@ dnl along with this program. If not, see . dnl AT_BANNER([CROSSTABS procedure]) +dnl Based on bug #60982. +AT_SETUP([CROSSTABS residuals]) +AT_DATA([crosstabs.sps], + [DATASET CLOSE ALL. +DATA LIST LIST NOTABLE/ r c n. +BEGIN DATA +1 1 26 +1 2 31 +2 1 12 +2 2 32 +3 1 27 +3 2 18 +4 1 8 +4 2 7 +END DATA. +WEIGHT by n. +CROSSTABS r by c /STATISTICS=CHISQ +/CELLS=COUNT EXPECTED RESID SRESID ASRESID. +]) +AT_CHECK([pspp -O format=csv crosstabs.sps], [0], + [Table: Summary +,Cases,,,,, +,Valid,,Missing,,Total, +,N,Percent,N,Percent,N,Percent +r × c,161.00,100.0%,.00,.0%,161.00,100.0% + +Table: r × c +,,,c,,Total +,,,1.00,2.00, +r,1.00,Count,26.00,31.00,57.00 +,,Expected,25.84,31.16,.35 +,,Residual,.16,-.16, +,,Std. Residual,.03,-.03, +,,Adjusted Residual,.05,-.05, +,2.00,Count,12.00,32.00,44.00 +,,Expected,19.95,24.05,.27 +,,Residual,-7.95,7.95, +,,Std. Residual,-1.78,1.62, +,,Adjusted Residual,-2.82,2.82, +,3.00,Count,27.00,18.00,45.00 +,,Expected,20.40,24.60,.28 +,,Residual,6.60,-6.60, +,,Std. Residual,1.46,-1.33, +,,Adjusted Residual,2.33,-2.33, +,4.00,Count,8.00,7.00,15.00 +,,Expected,6.80,8.20,.09 +,,Residual,1.20,-1.20, +,,Std. Residual,.46,-.42, +,,Adjusted Residual,.65,-.65, +Total,,Count,73.00,88.00,161.00 +,,Expected,.45,.55,1.00 + +Table: Chi-Square Tests +,Value,df,Asymptotic Sig. (2-tailed) +Pearson Chi-Square,10.09,3.00,.018 +Likelihood Ratio,10.35,3.00,.016 +Linear-by-Linear Association,1.96,1.00,.162 +N of Valid Cases,161.00,, +]) +AT_CLEANUP + AT_SETUP([CROSSTABS integer mode crash]) AT_DATA([crosstabs.sps], [DATA LIST LIST /A * B * X * Y * . @@ -44,13 +105,13 @@ Table: X × Y ,,,Y,,,,,,,Total ,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00, X,1.00,Count,0,0,0,0,0,0,0,0 -,2.00,,0,0,0,0,0,0,0,0 -,3.00,,0,0,0,0,0,0,0,0 -,4.00,,0,0,0,0,1,0,0,1 -,5.00,,0,0,0,0,0,0,0,0 -,6.00,,0,0,0,0,0,0,0,0 -,7.00,,0,0,0,0,0,0,0,0 -Total,,,0,0,0,0,1,0,0,1 +,2.00,Count,0,0,0,0,0,0,0,0 +,3.00,Count,0,0,0,0,0,0,0,0 +,4.00,Count,0,0,0,0,1,0,0,1 +,5.00,Count,0,0,0,0,0,0,0,0 +,6.00,Count,0,0,0,0,0,0,0,0 +,7.00,Count,0,0,0,0,0,0,0,0 +Total,,Count,0,0,0,0,1,0,0,1 ]]) AT_CLEANUP @@ -82,9 +143,9 @@ Table: x × y ,,,y,,,,,,,Total ,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00, x,1.00,Count,,,,,,,, -,2.00,,,,,,,,, -,3.00,,,,,,,,, -Total,,,,,,,,,, +,2.00,Count,,,,,,,, +,3.00,Count,,,,,,,, +Total,,Count,,,,,,,, ]]) AT_CLEANUP @@ -124,9 +185,9 @@ Table: x × y ,,,y,,,,Total ,,,one unity,three lots,two duality,zero none, x,1.00,Count,1,0,0,1,2 -,2.00,,0,0,1,0,1 -,3.00,,0,1,0,0,1 -Total,,,1,1,1,1,4 +,2.00,Count,0,0,1,0,1 +,3.00,Count,0,1,0,0,1 +Total,,Count,1,1,1,1,4 ]]) AT_CLEANUP @@ -183,8 +244,8 @@ Table: y × z ,,,z,,Total ,,,1,2, y,1,Count,4,3,7 -,2,,1,1,2 -Total,,,5,4,9 +,2,Count,1,1,2 +Total,,Count,5,4,9 ]) AT_CLEANUP @@ -220,9 +281,9 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,2.00,Count,0,1,1 -,3.00,,1,0,1 -,4.00,,1,1,2 -Total,,,2,2,4 +,3.00,Count,1,0,1 +,4.00,Count,1,1,2 +Total,,Count,2,2,4 Table: Chi-Square Tests ,Value,df,Asymptotic Sig. (2-tailed) @@ -254,7 +315,7 @@ SPLIT FILE SEPARATE BY v0. CROSSTABS /TABLES= v1 BY v2 - /FORMAT=AVALUE TABLES PIVOT + /FORMAT=AVALUE TABLES /STATISTICS=CHISQ /CELLS=COUNT ROW COLUMN TOTAL. ]) @@ -385,16 +446,16 @@ Table: x × y × z ,,,,,y,,Total ,,,,,1,2, z,1,x,1,Count,1,0,1 -,,,3,,0,0,1 -,,,5,,1,0,1 -,,,7,,0,0,1 -,,,8,,0,1,1 -,,Total,,,4,1,5 -,2,x,2,,0,0,1 -,,,4,,0,1,1 -,,,6,,0,0,1 -,,,9,,1,0,1 -,,Total,,,3,1,4 +,,,3,Count,0,0,1 +,,,5,Count,1,0,1 +,,,7,Count,0,0,1 +,,,8,Count,0,1,1 +,,Total,,Count,4,1,5 +,2,x,2,Count,0,0,1 +,,,4,Count,0,1,1 +,,,6,Count,0,0,1 +,,,9,Count,1,0,1 +,,Total,,Count,3,1,4 Table: Chi-Square Tests ,,,Value,df,Asymptotic Sig. (2-tailed) @@ -497,8 +558,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,2.80,3.20,6.00 -,2.00,,1.00,2.00,3.00 -Total,,,3.80,5.20,9.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,3.80,5.20,9.00 Table: Summary ,Cases,,,,, @@ -510,8 +571,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,2.80,3.20,6.00 -,2.00,,1.00,2.00,3.00 -Total,,,3.80,5.20,9.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,3.80,5.20,9.00 Table: Summary ,Cases,,,,, @@ -523,8 +584,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,2.00,4.00,6.00 -,2.00,,1.00,2.00,3.00 -Total,,,3.00,6.00,9.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,3.00,6.00,9.00 Table: Summary ,Cases,,,,, @@ -536,8 +597,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,2.00,2.00,4.00 -,2.00,,1.00,2.00,3.00 -Total,,,3.00,4.00,7.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,3.00,4.00,7.00 Table: Summary ,Cases,,,,, @@ -549,8 +610,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,3.00,3.00,6.00 -,2.00,,1.00,2.00,3.00 -Total,,,4.00,5.00,9.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,4.00,5.00,9.00 Table: Summary ,Cases,,,,, @@ -562,8 +623,8 @@ Table: x × y ,,,y,,Total ,,,1.00,2.00, x,1.00,Count,2.00,3.00,5.00 -,2.00,,1.00,2.00,3.00 -Total,,,3.00,5.00,8.00 +,2.00,Count,1.00,2.00,3.00 +Total,,Count,3.00,5.00,8.00 ]) AT_CLEANUP @@ -596,9 +657,9 @@ Table: x × y ,,,y,,Total ,,,2.00,1.00, x,4.00,Count,0,1,1 -,3.00,,2,1,3 -,2.00,,2,0,2 -Total,,,4,2,6 +,3.00,Count,2,1,3 +,2.00,Count,2,0,2 +Total,,Count,4,2,6 ]) AT_CLEANUP @@ -621,7 +682,9 @@ Table: Summary ,N,Percent,N,Percent,N,Percent X1 × X2,0,.0%,1,100.0%,1,100.0% -crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 × X2 contained no non-missing cases. +"crosstabs.sps:8.20-8.27: warning: CROSSTABS: Crosstabulation X1 × X2 contained no non-missing cases. + 8 | CROSSTABS /TABLES= X1 by X2. + | ^~~~~~~~" ]) AT_CLEANUP @@ -858,8 +921,8 @@ Table: type of school × female ,,,female,,Total ,,,male,female, type of school,public,Count,77,91,168 -,private,,14,18,32 -Total,,,91,109,200 +,private,Count,14,18,32 +Total,,Count,91,109,200 Table: Chi-Square Tests ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) @@ -880,8 +943,8 @@ Table: female × ses ,,,ses,,,Total ,,,low,middle,high, female,male,Count,15,47,29,91 -,female,,32,48,29,109 -Total,,,47,95,58,200 +,female,Count,32,48,29,109 +Total,,Count,47,95,58,200 Table: Chi-Square Tests ,Value,df,Asymptotic Sig. (2-tailed) @@ -920,10 +983,10 @@ Table: x × y ,,,y,,,,,Total ,,,4.000,6.000,10.000,12.000,13.000, x,1.000,Count,1,0,0,0,0,1 -,3.000,,0,1,0,0,0,1 -,5.000,,0,0,1,1,0,2 -,6.000,,0,0,0,0,1,1 -Total,,,1,1,1,1,1,5 +,3.000,Count,0,1,0,0,0,1 +,5.000,Count,0,0,1,1,0,2 +,6.000,Count,0,0,0,0,1,1 +Total,,Count,1,1,1,1,1,5 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -965,16 +1028,16 @@ Table: x × y ,,,y,,,,,,,,,Total ,,,1.500,4.000,5.000,6.000,6.500,7.000,9.000,10.500,11.000, x,1.000,Count,1,0,0,0,0,0,0,0,0,1 -,2.000,,1,0,0,0,0,0,0,0,0,1 -,3.000,,0,1,0,0,0,0,0,0,0,1 -,4.000,,0,0,0,1,0,0,0,0,0,1 -,5.000,,0,0,1,0,0,0,0,0,0,1 -,6.000,,0,0,0,0,0,1,0,0,0,1 -,7.000,,0,0,0,0,1,0,0,0,0,1 -,8.000,,0,0,0,0,0,0,1,0,0,1 -,9.000,,0,0,0,0,0,0,0,1,0,1 -,10.000,,0,0,0,0,0,0,0,0,1,1 -Total,,,2,1,1,1,1,1,1,1,1,10 +,2.000,Count,1,0,0,0,0,0,0,0,0,1 +,3.000,Count,0,1,0,0,0,0,0,0,0,1 +,4.000,Count,0,0,0,1,0,0,0,0,0,1 +,5.000,Count,0,0,1,0,0,0,0,0,0,1 +,6.000,Count,0,0,0,0,0,1,0,0,0,1 +,7.000,Count,0,0,0,0,1,0,0,0,0,1 +,8.000,Count,0,0,0,0,0,0,1,0,0,1 +,9.000,Count,0,0,0,0,0,0,0,1,0,1 +,10.000,Count,0,0,0,0,0,0,0,0,1,1 +Total,,Count,2,1,1,1,1,1,1,1,1,10 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -1015,13 +1078,13 @@ Table: x × y ,,,y,,,,,,,,Total ,,,28.000,58.000,66.000,75.000,85.000,87.000,91.000,122.000, x,25.000,Count,1,0,0,0,0,0,0,0,1 -,35.000,,0,1,0,0,0,0,0,0,1 -,44.000,,0,0,1,0,0,0,0,0,1 -,50.000,,0,0,0,1,0,0,0,0,1 -,56.000,,0,0,0,0,0,1,1,0,2 -,65.000,,0,0,0,0,1,0,1,0,2 -,87.000,,0,0,0,0,0,0,0,1,1 -Total,,,1,1,1,1,1,1,2,1,9 +,35.000,Count,0,1,0,0,0,0,0,0,1 +,44.000,Count,0,0,1,0,0,0,0,0,1 +,50.000,Count,0,0,0,1,0,0,0,0,1 +,56.000,Count,0,0,0,0,0,1,1,0,2 +,65.000,Count,0,0,0,0,1,0,1,0,2 +,87.000,Count,0,0,0,0,0,0,0,1,1 +Total,,Count,1,1,1,1,1,1,2,1,9 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -1065,15 +1128,15 @@ Table: x × y ,,,y,,,,,,,,,,,,Total ,,,2.000,4.000,5.000,7.000,9.000,11.000,12.000,14.000,15.000,17.000,18.000,20.000, x,2.000,Count,0,0,0,1,0,0,0,0,0,0,0,0,1 -,3.000,,0,0,0,0,0,0,1,0,0,0,0,0,1 -,4.000,,0,0,0,0,1,1,0,0,0,0,0,0,2 -,5.000,,0,0,1,0,0,0,0,0,0,0,0,0,1 -,6.000,,1,1,0,0,0,0,0,0,0,0,0,0,2 -,7.000,,0,0,0,0,0,0,0,1,0,0,0,0,1 -,8.000,,0,0,0,0,0,0,0,0,1,0,0,0,1 -,9.000,,0,0,0,0,0,0,0,0,0,1,0,0,1 -,10.000,,0,0,0,0,0,0,0,0,0,0,1,1,2 -Total,,,1,1,1,1,1,1,1,1,1,1,1,1,12 +,3.000,Count,0,0,0,0,0,0,1,0,0,0,0,0,1 +,4.000,Count,0,0,0,0,1,1,0,0,0,0,0,0,2 +,5.000,Count,0,0,1,0,0,0,0,0,0,0,0,0,1 +,6.000,Count,1,1,0,0,0,0,0,0,0,0,0,0,2 +,7.000,Count,0,0,0,0,0,0,0,1,0,0,0,0,1 +,8.000,Count,0,0,0,0,0,0,0,0,1,0,0,0,1 +,9.000,Count,0,0,0,0,0,0,0,0,0,1,0,0,1 +,10.000,Count,0,0,0,0,0,0,0,0,0,0,1,1,2 +Total,,Count,1,1,1,1,1,1,1,1,1,1,1,1,12 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -1115,16 +1178,16 @@ Table: x × y ,,,y,,,,,,,,,,Total ,,,15000.00,26000.00,29000.00,32000.00,33000.00,41000.00,45000.00,52000.00,68000.00,80000.00, x,18.000,Count,1,0,0,0,0,0,0,0,0,0,1 -,24.000,,0,1,0,0,0,0,0,0,0,0,1 -,25.000,,0,0,1,0,0,0,0,0,0,0,1 -,26.000,,0,0,0,1,0,0,0,0,0,0,1 -,33.000,,0,0,0,0,1,0,0,0,0,0,1 -,37.000,,0,0,0,0,0,1,0,0,0,0,1 -,40.000,,0,0,0,0,0,0,1,0,0,0,1 -,45.000,,0,0,0,0,0,0,0,1,0,0,1 -,57.000,,0,0,0,0,0,0,0,0,1,0,1 -,64.000,,0,0,0,0,0,0,0,0,0,1,1 -Total,,,1,1,1,1,1,1,1,1,1,1,10 +,24.000,Count,0,1,0,0,0,0,0,0,0,0,1 +,25.000,Count,0,0,1,0,0,0,0,0,0,0,1 +,26.000,Count,0,0,0,1,0,0,0,0,0,0,1 +,33.000,Count,0,0,0,0,1,0,0,0,0,0,1 +,37.000,Count,0,0,0,0,0,1,0,0,0,0,1 +,40.000,Count,0,0,0,0,0,0,1,0,0,0,1 +,45.000,Count,0,0,0,0,0,0,0,1,0,0,1 +,57.000,Count,0,0,0,0,0,0,0,0,1,0,1 +,64.000,Count,0,0,0,0,0,0,0,0,0,1,1 +Total,,Count,1,1,1,1,1,1,1,1,1,1,10 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -1659,7 +1722,7 @@ end data. weight by w. crosstabs /table = p1 by p2 - statistics = kappa + /statistics = kappa . ]) @@ -1675,8 +1738,8 @@ Table: p1 × p2 ,,,p2,,Total ,,,.000,1.000, p1,.000,Count,18.000,1.000,19.000 -,1.000,,1.000,.000,1.000 -Total,,,19.000,1.000,20.000 +,1.000,Count,1.000,.000,1.000 +Total,,Count,19.000,1.000,20.000 Table: Symmetric Measures ,,Value,Asymp. Std. Error,Approx. T @@ -1818,8 +1881,8 @@ Table: factor × disease ,,,disease,,Total ,,,Yes,No, factor,Placebo,Count,20,80,100 -,Aspirin,,15,135,150 -Total,,,35,215,250 +,Aspirin,Count,15,135,150 +Total,,Count,35,215,250 Table: Chi-Square Tests ,Value,df,Asymptotic Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed)