3 # This program tests the ROC command.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
12 PSPP=$top_builddir/src/ui/terminal/pspp
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
61 activity="create program"
64 data list notable list /x * y * w * a *.
84 /print = se coordinates
85 /criteria = testpos(large) distribution(free) ci(99)
89 /plot = curve(reference)
90 /print = se coordinates
91 /criteria = testpos(large) distribution(negexpo) ci(95)
94 if [ $? -ne 0 ] ; then no_result ; fi
96 activity="run program"
97 $SUPERVISOR $PSPP --testing-mode $TESTFILE
98 if [ $? -ne 0 ] ; then no_result ; fi
101 activity="compare results"
102 diff -c $TEMPDIR/pspp.csv - << EOF
105 a,Unweighted,Weighted
109 Table: Area Under the Curve (x)
110 ,,,Asymp. 99% Confidence Interval,
111 Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
112 .910,.030,.000,.839,.981
114 Table: Coordinates of the Curve (x)
115 Positive if greater than or equal to,Sensitivity,1 - Specificity
125 a,Unweighted,Weighted
129 Table: Area Under the Curve
130 ,,,,Asymp. 95% Confidence Interval,
131 Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
132 x,.910,.030,.000,.860,.960
133 y,.697,.052,.001,.611,.783
135 Table: Coordinates of the Curve
136 Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
151 if [ $? -ne 0 ] ; then fail ; fi