dnl PSPP - a program for statistical analysis.
dnl Copyright (C) 2017 Free Software Foundation, Inc.
dnl PSPP - a program for statistical analysis.
dnl Copyright (C) 2017 Free Software Foundation, Inc.
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 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 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 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 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
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_CHECK([pspp -O format=csv lr-data.sps], [0],
- [dnl
-Table: Dependent Variable Encoding
+AT_CHECK([pspp -o pspp.csv -o pspp.txt lr-data.sps], [0], [dnl
+note: Estimation terminated at iteration number 6 because parameter estimates changed by less than 0.001
+])
+AT_CHECK([cat pspp.csv], [0], [Table: Dependent Variable Encoding
Table: Case Processing Summary
Unweighted Cases,N,Percent
Table: Case Processing Summary
Unweighted Cases,N,Percent
-Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
-,37.323,.455,.659
+Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
+1,37.323,.455,.659
-Step 1,outcome,1.000,43,5,89.583
-,,2.000,4,14,77.778
-,Overall Percentage,,,,86.364
+Step 1,outcome,1.000,43,5,89.6%
+,,2.000,4,14,77.8%
+,Overall Percentage,,,,86.4%
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
Step 1,survrate,-.081,.019,17.756,1,.000,.922
,Constant,2.684,.811,10.941,1,.001,14.639
])
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
Step 1,survrate,-.081,.019,17.756,1,.000,.922
,Constant,2.684,.811,10.941,1,.001,14.639
])
dnl Only the summary information should be different
AT_CHECK([diff run0 run1], [1], [dnl
8,10c8,10
dnl Only the summary information should be different
AT_CHECK([diff run0 run1], [1], [dnl
8,10c8,10
dnl this displays the unweighted totals.
AT_CHECK([diff unweighted-result weighted-result], [1], [dnl
8c8
dnl this displays the unweighted totals.
AT_CHECK([diff unweighted-result weighted-result], [1], [dnl
8c8
-> Total,63,100.000
-23,24c23,24
-< Step 1,outcome,1.000,43,5,89.583
-< ,,2.000,4,14,77.778
+> Total,63,100.0%
+22,23c22,23
+< Step 1,outcome,1.000,43,5,89.6%
+< ,,2.000,4,14,77.8%
-> Step 1,outcome,1.000,43.000,5.000,89.583
-> ,,2.000,4.000,14.000,77.778
+> Step 1,outcome,1.000,43.000,5.000,89.6%
+> ,,2.000,4.000,14.000,77.8%
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Case Processing Summary
Unweighted Cases,N,Percent
Table: Case Processing Summary
Unweighted Cases,N,Percent
-Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
-,275.637,.008,.011
+Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
+1,275.637,.008,.011
-Step 1,female,.00,0,91,.000
-,,1.00,0,109,100.000
-,Overall Percentage,,,,54.500
+Step 1,female,.00,0,91,.0%
+,,1.00,0,109,100.0%
+,Overall Percentage,,,,54.5%
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
dnl An example to check the behaviour of LOGISTIC REGRESSION with a categorical
dnl variable. This examṕle was inspired from that at:
dnl An example to check the behaviour of LOGISTIC REGRESSION with a categorical
dnl variable. This examṕle was inspired from that at:
AT_SETUP([LOGISTIC REGRESSION with categorical])
AT_KEYWORDS([categorical categoricals])
AT_DATA([lr-cat.data], [dnl
AT_SETUP([LOGISTIC REGRESSION with categorical])
AT_KEYWORDS([categorical categoricals])
AT_DATA([lr-cat.data], [dnl
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Case Processing Summary
Unweighted Cases,N,Percent
Table: Case Processing Summary
Unweighted Cases,N,Percent
-Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
-,458.517,.098,.138
+Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
+1,458.517,.098,.138
-Step 1,y,4.000,254,19,93.040
-,,9.000,97,30,23.622
-,Overall Percentage,,,,71.000
+Step 1,y,4.000,254,19,93.0%
+,,9.000,97,30,23.6%
+,Overall Percentage,,,,71.0%
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
,bcat(3),.211,.393,.289,1,.591,1.235
,Constant,-5.541,1.138,23.709,1,.000,.004
])
,bcat(3),.211,.393,.289,1,.591,1.235
,Constant,-5.541,1.138,23.709,1,.000,.004
])
AT_KEYWORDS([categorical categoricals])
AT_DATA([lr-cat2.data], [dnl
AT_KEYWORDS([categorical categoricals])
AT_DATA([lr-cat2.data], [dnl
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Case Processing Summary
Unweighted Cases,N,Percent
Table: Case Processing Summary
Unweighted Cases,N,Percent
-Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
-,165.701,.280,.408
+Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
+1,165.701,.280,.408
-Step 1,honcomp,.000,132,15,89.796
-,,1.000,26,27,50.943
-,Overall Percentage,,,,79.500
+Step 1,honcomp,.000,132,15,89.8%
+,,1.000,26,27,50.9%
+,Overall Percentage,,,,79.5%
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
Table: Variables in the Equation
,,B,S.E.,Wald,df,Sig.,Exp(B)
AT_CHECK([pspp -O format=csv ci.sps], [0], [dnl
Table: Dependent Variable Encoding
Original Value,Internal Value
AT_CHECK([pspp -O format=csv ci.sps], [0], [dnl
Table: Dependent Variable Encoding
Original Value,Internal Value
Table: Case Processing Summary
Unweighted Cases,N,Percent
Table: Case Processing Summary
Unweighted Cases,N,Percent
-Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
-,211.195,.120,.172
+Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
+1,211.195,.120,.172
-Step 1,disease,.000,131,8,94.245
-,,1.000,41,16,28.070
-,Overall Percentage,,,,75.000
+Step 1,disease,.000,131,8,94.2%
+,,1.000,41,16,28.1%
+,Overall Percentage,,,,75.0%
-,,,,,,,,95% CI for Exp(B),
-,,B,S.E.,Wald,df,Sig.,Exp(B),Lower,Upper
+,,B,S.E.,Wald,df,Sig.,Exp(B),95% CI for Exp(B),
+,,,,,,,,Lower,Upper
Step 1,age,.027,.009,8.647,1,.003,1.027,1.009,1.045
,savings,.061,.386,.025,1,.874,1.063,.499,2.264
,sciostat,,,.440,2,.803,,,
Step 1,age,.027,.009,8.647,1,.003,1.027,1.009,1.045
,savings,.061,.386,.025,1,.874,1.063,.499,2.264
,sciostat,,,.440,2,.803,,,