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/>.
19 AT_SETUP([ROC free distribution])
20 AT_DATA([roc.sps], [dnl
22 data list notable list /x * y * w * a *.
42 /print = se coordinates
43 /criteria = testpos(large) distribution(free) ci(99)
46 AT_CHECK([pspp -o pspp.csv roc.sps])
47 AT_CHECK([cat pspp.csv], [0], [dnl
54 Table: Area Under the Curve
55 ,Area,Std. Error,Asymptotic Sig.,Asymp. 99% Confidence Interval,
56 Variable under test,,,,Lower Bound,Upper Bound
57 x,.910,.030,.000,.839,.981
59 Table: Coordinates of the Curve
60 Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
70 AT_SETUP([ROC negative exponential distribution])
71 AT_DATA([roc.sps], [dnl
73 data list notable list /x * y * w * a *.
92 /plot = curve(reference)
93 /print = se coordinates
94 /criteria = testpos(large) distribution(negexpo) ci(95)
97 AT_CHECK([pspp -o pspp.csv roc.sps])
98 AT_CHECK([cat pspp.csv], [0], [dnl
101 a,Unweighted,Weighted
105 Table: Area Under the Curve
106 ,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
107 Variable under test,,,,Lower Bound,Upper Bound
108 x,.910,.030,.000,.860,.960
109 y,.697,.052,.001,.611,.783
111 Table: Coordinates of the Curve
112 Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
129 AT_SETUP([ROC with anomaly])
130 AT_DATA([roc.sps], [dnl
132 data list notable list /x * a * comment (a20).
149 22 0 "here is the anomaly"
169 AT_CHECK([pspp -o pspp.csv -o pspp.txt roc.sps])
170 AT_CHECK([cat pspp.csv], [0], [dnl
173 a,Unweighted,Weighted
177 Table: Area Under the Curve
178 ,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
179 Variable under test,,,,Lower Bound,Upper Bound
180 x,.490,.111,.927,.307,.673
187 AT_SETUP([ROC crash on no state variable])
188 AT_DATA([roc.sps], [dnl
189 data list notable list /x * y * w * a *.
199 AT_CHECK([pspp -o pspp.csv roc.sps], [1], [ignore])
204 AT_SETUP([ROC crash on invalid syntax])
205 AT_DATA([roc.sps], [dnl
206 data list notable list /x * y * a *.
217 AT_CHECK([pspp -O format=csv roc.sps], [1], [ignore])