X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fnpar-chisquare.sh;h=0f4b3facbe331a8f709c9fe3eb687addb8251640;hb=dfd1972f7bcb550a4fc3b05dbe7e71d12334b0a7;hp=33e2311bc9b49bfcd3756b5ccc91373d35db4fc1;hpb=c9a3c45e44c1c03d13d4eb186e3817bc836f75f8;p=pspp-builds.git diff --git a/tests/command/npar-chisquare.sh b/tests/command/npar-chisquare.sh index 33e2311b..0f4b3fac 100755 --- a/tests/command/npar-chisquare.sh +++ b/tests/command/npar-chisquare.sh @@ -96,75 +96,58 @@ $SUPERVISOR $PSPP --testing-mode $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output 1" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << EOF -1.1 NPAR TESTS. x -+--------#----------+----------+--------+ -| #Observed N|Expected N|Residual| -+--------#----------+----------+--------+ -| 1.00# 3.00| 2.33| .67| -| 2.00# 3.00| 2.33| .67| -| 3.10# 4.00| 2.33| 1.67| -| 3.20# 1.00| 2.33| -1.33| -| 4.00# 2.00| 2.33| -.33| -| 5.00# 1.00| 2.33| -1.33| -|Total # 14.00| | | -+--------#----------+----------+--------+ -1.2 NPAR TESTS. y -+--------#----------+----------+--------+ -| #Observed N|Expected N|Residual| -+--------#----------+----------+--------+ -| 1.00# 7.00| 3.50| 3.50| -| 2.00# 4.00| 3.50| .50| -| 3.00# 1.00| 3.50| -2.50| -| 4.00# 2.00| 3.50| -1.50| -|Total # 14.00| | | -+--------#----------+----------+--------+ -1.3 NPAR TESTS. Test Statistics -+-----------#----+----+ -| # x | y | -+-----------#----+----+ -|Chi-Square #3.14|6.00| -|df # 5| 3| -|Asymp. Sig.# .68| .11| -+-----------#----+----+ -2.1 NPAR TESTS. y -+--------#----------+----------+--------+ -| #Observed N|Expected N|Residual| -+--------#----------+----------+--------+ -| 1.00# 7.00| 2.63| 4.38| -| 2.00# 4.00| 3.50| .50| -| 3.00# 1.00| 4.38| -3.38| -| 4.00# 2.00| 3.50| -1.50| -|Total # 14.00| | | -+--------#----------+----------+--------+ -2.2 NPAR TESTS. Test Statistics -+-----------#-----+ -| # y | -+-----------#-----+ -|Chi-Square #10.61| -|df # 3| -|Asymp. Sig.# .01| -+-----------#-----+ -3.1 NPAR TESTS. Frequencies -+-----#---------------------------------------#---------------------------------------+ -| # x # y | -| #--------+----------+----------+--------#--------+----------+----------+--------+ -| #Category|Observed N|Expected N|Residual#Category|Observed N|Expected N|Residual| -+-----#--------+----------+----------+--------#--------+----------+----------+--------+ -|1 # 2.00| 3.00| 3.16| -.16# 2.00| 4.00| 2.21| 1.79| -|2 # 3.00| 5.00| 5.26| -.26# 3.00| 1.00| 3.68| -2.68| -|3 # 4.00| 2.00| 1.58| .42# 4.00| 2.00| 1.11| .89| -|Total# | 10.00| | # | 7.00| | | -+-----#--------+----------+----------+--------#--------+----------+----------+--------+ -3.2 NPAR TESTS. Test Statistics -+-----------#---+----+ -| # x | y | -+-----------#---+----+ -|Chi-Square #.13|4.13| -|df # 2| 2| -|Asymp. Sig.#.94| .13| -+-----------#---+----+ +diff -c $TEMPDIR/pspp.csv - << EOF +Table: x +,Observed N,Expected N,Residual +1.00,3.00,2.33,.67 +2.00,3.00,2.33,.67 +3.10,4.00,2.33,1.67 +3.20,1.00,2.33,-1.33 +4.00,2.00,2.33,-.33 +5.00,1.00,2.33,-1.33 +Total,14.00,, + +Table: y +,Observed N,Expected N,Residual +1.00,7.00,3.50,3.50 +2.00,4.00,3.50,.50 +3.00,1.00,3.50,-2.50 +4.00,2.00,3.50,-1.50 +Total,14.00,, + +Table: Test Statistics +,x,y +Chi-Square,3.14,6.00 +df,5,3 +Asymp. Sig.,.68,.11 + +Table: y +,Observed N,Expected N,Residual +1.00,7.00,2.63,4.38 +2.00,4.00,3.50,.50 +3.00,1.00,4.38,-3.38 +4.00,2.00,3.50,-1.50 +Total,14.00,, + +Table: Test Statistics +,y +Chi-Square,10.61 +df,3 +Asymp. Sig.,.01 + +Table: Frequencies +,x,,,,y,,, +,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual +1,2.00,3.00,3.16,-.16,2.00,4.00,2.21,1.79 +2,3.00,5.00,5.26,-.26,3.00,1.00,3.68,-2.68 +3,4.00,2.00,1.58,.42,4.00,2.00,1.11,.89 +Total,,10.00,,,,7.00,, + +Table: Test Statistics +,x,y +Chi-Square,.13,4.13 +df,2,2 +Asymp. Sig.,.94,.13 EOF if [ $? -ne 0 ] ; then fail ; fi @@ -237,40 +220,31 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="compare output 3" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - <