-AT_BANNER([LOGISTIC REGRESSION])
+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([LOGISTIC REGRESSION])
dnl These examples are adapted from
dnl http://www.uvm.edu/~dhowell/gradstat/psych341/lectures/Logistic%20Regression/LogisticReg1.html
data list notable file='lr-data.txt'
list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *.
-missing values survrate (999) avoid (44444).
+missing values survrate (999) avoid (44444) outcome (99).
logistic regression
variables = outcome with survrate avoid
AT_CHECK([pspp -O format=csv lr-data.sps > run0], [0], [ignore])
+dnl Append some cases with missing values into the data.
cat >> lr-data.txt << HERE
105.00 1.00 999.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1
106.00 1.00 999.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1
107.00 1.00 5.00 3.00 2.00 .28 44444 34 .00897 -1.00905 1
+ 108.00 99 5.00 3.00 2.00 .28 4 34 .00897 -1.00905 1
HERE
AT_CHECK([pspp -O format=csv lr-data.sps > run1], [0], [ignore])
< Missing Cases,0,.000
< Total,66,100.000
---
-> Included in Analysis,66,95.652
-> Missing Cases,3,4.348
-> Total,69,100.000
+> Included in Analysis,66,94.286
+> Missing Cases,4,5.714
+> Total,70,100.000
])
AT_CLEANUP