1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
18 AT_SETUP([ROC, free distribution])
19 AT_DATA([roc.sps], [dnl
21 data list notable list /x * y * w * a *.
41 /print = se coordinates
42 /criteria = testpos(large) distribution(free) ci(99)
45 AT_CHECK([pspp -o pspp.csv roc.sps])
46 AT_CHECK([cat pspp.csv], [0], [dnl
53 Table: Area Under the Curve (x)
54 ,,,Asymp. 99% Confidence Interval,
55 Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
56 .910,.030,.000,.839,.981
58 Table: Coordinates of the Curve (x)
59 Positive if greater than or equal to,Sensitivity,1 - Specificity
69 AT_SETUP([ROC, negative exponential distribution])
70 AT_DATA([roc.sps], [dnl
72 data list notable list /x * y * w * a *.
91 /plot = curve(reference)
92 /print = se coordinates
93 /criteria = testpos(large) distribution(negexpo) ci(95)
96 AT_CHECK([pspp -o pspp.csv roc.sps])
97 AT_CHECK([cat pspp.csv], [0], [dnl
100 a,Unweighted,Weighted
104 Table: Area Under the Curve
105 ,,,,Asymp. 95% Confidence Interval,
106 Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
107 x,.910,.030,.000,.860,.960
108 y,.697,.052,.001,.611,.783
110 Table: Coordinates of the Curve
111 Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
128 AT_SETUP([ROC, with anomaly])
129 AT_DATA([roc.sps], [dnl
131 data list notable list /x * a * comment (a20).
148 22 0 "here is the anomoly"
168 AT_CHECK([pspp -o pspp.csv roc.sps])
169 AT_CHECK([cat pspp.csv], [0], [dnl
172 a,Unweighted,Weighted
176 Table: Area Under the Curve (x)
177 ,,,Asymp. 95% Confidence Interval,
178 Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
179 .490,.111,.927,.307,.673
186 AT_SETUP([ROC crash on no state variable])
187 AT_DATA([roc.sps], [dnl
188 data list notable list /x * y * w * a *.
198 AT_CHECK([pspp -o pspp.csv roc.sps], [1], [ignore])
203 AT_SETUP([ROC crash on invalid syntax])
204 AT_DATA([roc.sps], [dnl
205 data list notable list /x * y * a *.
216 AT_CHECK([pspp -O format=csv roc.sps], [1], [ignore])