X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fregression.sh;h=360115f2e400fe6d5b6300e9725a5058ce778d16;hb=cb062bfc8fa1b1477de31fd8a0f072f4bcf3d6b1;hp=ddb78e1a317e7c2283f906ab3b1d5048eee0fc9d;hpb=9aff19b717bcc242e16d04c34f348fd79ebdd685;p=pspp diff --git a/tests/command/regression.sh b/tests/command/regression.sh index ddb78e1a31..360115f2e4 100755 --- a/tests/command/regression.sh +++ b/tests/command/regression.sh @@ -9,7 +9,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps if [ -z "$top_builddir" ] ; then top_builddir=. ; fi if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -71,48 +71,52 @@ begin data -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data -regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter. +regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid. +list. EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << EOF -1.1 DATA LIST. Reading free-form data from INLINE. -+--------+------+ -|Variable|Format| -#========#======# -|v0 |F8.0 | -|v1 |F8.0 | -|v2 |F8.0 | -+--------+------+ -2.1 REGRESSION. Model Summary -#============#========#=================#==========================# -# R #R Square|Adjusted R Square|Std. Error of the Estimate# -#========#===#========#=================#==========================# -# |.97# .94| .93| .33# -#========#===#========#=================#==========================# -2.2 REGRESSION. ANOVA -#===================#==============#==#===========#======#============# -# #Sum of Squares|df|Mean Square| F |Significance# -#========#==========#==============#==#===========#======#============# -# |Regression# 202.75| 2| 101.376|56.754| .000# -# |Residual # 12.50| 7| 1.786| | # -# |Total # 215.26| 9| | | # -#========#==========#==============#==#===========#======#============# -2.3 REGRESSION. Coefficients -#===================#=====#==========#====#======#============# -# # B |Std. Error|Beta| t |Significance# -#========#==========#=====#==========#====#======#============# -# |(Constant)# 2.19| 2.36| .45| .93| .52# -# | v0 # 1.81| 1.05| .54| 1.72| .13# -# | v1 #-3.43| .33| .00|-10.33| .00# -# | # | | | | # -#========#==========#=====#==========#====#======#============# +diff -c $TEMPDIR/pspp.csv - << EOF +Table: Reading free-form data from INLINE. +Variable,Format +v0,F8.0 +v1,F8.0 +v2,F8.0 + +Table: Model Summary +,R,R Square,Adjusted R Square,Std. Error of the Estimate +,.97,.94,.93,1.34 + +Table: ANOVA +,,Sum of Squares,df,Mean Square,F,Significance +,Regression,202.75,2,101.38,56.75,.00 +,Residual,12.50,7,1.79,, +,Total,215.26,9,,, + +Table: Coefficients +,,B,Std. Error,Beta,t,Significance +,(Constant),2.19,2.36,.00,.93,.52 +,v0,1.81,1.05,.17,1.72,.12 +,v1,-3.43,.33,-1.03,-10.33,.00 +,,,,,, + +Table: Data List +v0,v1,v2,RES1,PRED1 +.65,7.74,-23.98,-.84,-23.13 +-.13,6.14,-19.64,-.54,-19.10 +.35,7.65,-25.27,-1.87,-23.40 +.69,6.13,-16.57,.97,-17.54 +-.07,8.25,-25.80,.40,-26.20 +-.34,6.03,-17.57,1.53,-19.10 +.76,9.83,-28.36,1.77,-30.13 +-.47,5.34,-16.80,.18,-16.97 +-.06,8.84,-29.26,-1.05,-28.21 +.56,6.20,-18.58,-.54,-18.04 EOF if [ $? -ne 0 ] ; then fail ; fi