+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+dnl
AT_BANNER([ROC])
-AT_SETUP([ROC, free distribution])
+AT_SETUP([ROC free distribution])
AT_DATA([roc.sps], [dnl
set format F10.3.
data list notable list /x * y * w * a *.
AT_CHECK([pspp -o pspp.csv roc.sps])
AT_CHECK([cat pspp.csv], [0], [dnl
Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
Positive,5,50.000
Negative,5,50.000
-Table: Area Under the Curve (x)
-,,,Asymp. 99% Confidence Interval,
-Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
-.910,.030,.000,.839,.981
-
-Table: Coordinates of the Curve (x)
-Positive if greater than or equal to,Sensitivity,1 - Specificity
-.000,1.000,1.000
-1.500,.960,.440
-2.500,.880,.160
-3.500,.680,.060
-4.500,.400,.020
-6.000,.000,.000
+Table: Area Under the Curve
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 99% Confidence Interval,
+,,,,Lower Bound,Upper Bound
+x,.910,.030,.000,.839,.981
+
+Table: Coordinates of the Curve
+Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity
+x,.000,1.000,1.000
+,1.500,.960,.440
+,2.500,.880,.160
+,3.500,.680,.060
+,4.500,.400,.020
+,6.000,.000,.000
])
AT_CLEANUP
-AT_SETUP([ROC, negative exponential distribution])
+AT_SETUP([ROC negative exponential distribution])
AT_DATA([roc.sps], [dnl
set format F10.3.
data list notable list /x * y * w * a *.
AT_CHECK([pspp -o pspp.csv roc.sps])
AT_CHECK([cat pspp.csv], [0], [dnl
Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
Positive,5,50.000
Negative,5,50.000
Table: Area Under the Curve
-,,,,Asymp. 95% Confidence Interval,
-Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
+,,,,Lower Bound,Upper Bound
x,.910,.030,.000,.860,.960
y,.697,.052,.001,.611,.783
])
AT_CLEANUP
-AT_SETUP([ROC, with anomaly])
+AT_SETUP([ROC with anomaly])
AT_DATA([roc.sps], [dnl
set format F10.3.
data list notable list /x * a * comment (a20).
20 1 ""
20 1 ""
22 0 "here and"
-22 0 "here is the anomoly"
+22 0 "here is the anomaly"
25 1 ""
25 0 ""
30 1 ""
roc x by a (1)
/plot = none
- print = se
+ print = se
.
])
-AT_CHECK([pspp -o pspp.csv roc.sps])
+AT_CHECK([pspp -o pspp.csv -o pspp.txt roc.sps])
AT_CHECK([cat pspp.csv], [0], [dnl
Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
Positive,14,14.000
Negative,14,14.000
-Table: Area Under the Curve (x)
-,,,Asymp. 95% Confidence Interval,
-Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound
-.490,.111,.927,.307,.673
+Table: Area Under the Curve
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
+,,,,Lower Bound,Upper Bound
+x,.490,.111,.927,.307,.673
])
AT_CLEANUP
AT_DATA([roc.sps], [dnl
data list notable list /x * y * a *.
bggin data.
-1 1 2
+1 1 2
1 2 28
end data.