])
AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
-regression.sps:16: warning: REGRESSION: REGRESSION with SAVE ignores FILTER. All cases will be processed.
+"regression.sps:16.82-16.96: warning: REGRESSION: REGRESSION with SAVE ignores FILTER. All cases will be processed.
+ 16 | regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid.
+ | ^~~~~~~~~~~~~~~"
Table: Model Summary (v2)
R,R Square,Adjusted R Square,Std. Error of the Estimate
REGRESSION /VARIABLES=mtbf duty_cycle /DEPENDENT=mttr.
REGRESSION /VARIABLES=mtbf /DEPENDENT=mttr.
])
-AT_CHECK([pspp -o pspp.csv -o pspp.txt regression.sps])
-AT_CHECK([cat pspp.csv], [0], [dnl
+
+AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
Table: Model Summary (Mean time to repair (hours) )
R,R Square,Adjusted R Square,Std. Error of the Estimate
-.99,.99,.99,2.24
+.94,.89,.88,6.54
Table: ANOVA (Mean time to repair (hours) )
,Sum of Squares,df,Mean Square,F,Sig.
-Regression,5308.87,2,2654.44,530.75,.000
-Residual,60.02,12,5.00,,
-Total,5368.89,14,,,
+Regression,9576.26,2,4788.13,111.94,.000
+Residual,1154.94,27,42.78,,
+Total,10731.20,29,,,
Table: Coefficients (Mean time to repair (hours) )
,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
,B,Std. Error,Beta,,
-(Constant),9.81,1.50,.00,6.54,.000
-Mean time between failures (months) ,3.10,.10,.99,32.43,.000
-Ratio of working to non-working time,1.09,1.78,.02,.61,.552
+(Constant),10.59,3.11,.00,3.40,.002
+Mean time between failures (months) ,3.02,.20,.95,14.88,.000
+Ratio of working to non-working time,-1.12,3.69,-.02,-.30,.763
Table: Model Summary (Mean time to repair (hours) )
R,R Square,Adjusted R Square,Std. Error of the Estimate
-.99,.99,.99,2.18
+.94,.89,.89,6.43
Table: ANOVA (Mean time to repair (hours) )
,Sum of Squares,df,Mean Square,F,Sig.
-Regression,5307.00,1,5307.00,1114.73,.000
-Residual,61.89,13,4.76,,
-Total,5368.89,14,,,
+Regression,9572.30,1,9572.30,231.28,.000
+Residual,1158.90,28,41.39,,
+Total,10731.20,29,,,
Table: Coefficients (Mean time to repair (hours) )
,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
,B,Std. Error,Beta,,
-(Constant),10.50,.96,.00,10.96,.000
-Mean time between failures (months) ,3.11,.09,.99,33.39,.000
+(Constant),9.90,2.10,.00,4.71,.000
+Mean time between failures (months) ,3.01,.20,.94,15.21,.000
])
+
AT_CLEANUP
])
AT_CLEANUP
+
+AT_SETUP([REGRESSION syntax errors])
+AT_DATA([regression.sps], [dnl
+DATA LIST LIST NOTABLE /x y z.
+REGRESSION VARIABLES=**.
+REGRESSION METHOD=ENTER x/VARIABLES.
+REGRESSION DEPENDENT=x/VARIABLES.
+REGRESSION DEPENDENT=**.
+REGRESSION METHOD=**.
+REGRESSION METHOD=ENTER **.
+REGRESSION STATISTICS=**.
+REGRESSION STATISTICS=CI(**).
+REGRESSION STATISTICS=CI(1 **).
+REGRESSION SAVE=**.
+REGRESSION **.
+])
+AT_CHECK([pspp -O format=csv regression.sps], [1], [dnl
+"regression.sps:2.22-2.23: error: REGRESSION: Syntax error expecting variable name.
+ 2 | REGRESSION VARIABLES=**.
+ | ^~"
+
+"regression.sps:3.27-3.35: error: REGRESSION: VARIABLES may not appear after METHOD.
+ 3 | REGRESSION METHOD=ENTER x/VARIABLES.
+ | ^~~~~~~~~"
+
+"regression.sps:4.24-4.32: error: REGRESSION: VARIABLES may not appear after DEPENDENT.
+ 4 | REGRESSION DEPENDENT=x/VARIABLES.
+ | ^~~~~~~~~"
+
+"regression.sps:5.22-5.23: error: REGRESSION: Syntax error expecting variable name.
+ 5 | REGRESSION DEPENDENT=**.
+ | ^~"
+
+"regression.sps:6.19-6.20: error: REGRESSION: Syntax error expecting ENTER.
+ 6 | REGRESSION METHOD=**.
+ | ^~"
+
+"regression.sps:7.25-7.26: error: REGRESSION: Syntax error expecting variable name.
+ 7 | REGRESSION METHOD=ENTER **.
+ | ^~"
+
+"regression.sps:8.23-8.24: error: REGRESSION: Syntax error expecting ALL, DEFAULTS, R, COEFF, ANOVA, BCOV, TOL, or CI.
+ 8 | REGRESSION STATISTICS=**.
+ | ^~"
+
+"regression.sps:9.26-9.27: error: REGRESSION: Syntax error expecting number.
+ 9 | REGRESSION STATISTICS=CI(**).
+ | ^~"
+
+"regression.sps:10.28-10.29: error: REGRESSION: Syntax error expecting `@:}@'.
+ 10 | REGRESSION STATISTICS=CI(1 **).
+ | ^~"
+
+"regression.sps:11.17-11.18: error: REGRESSION: Syntax error expecting PRED or RESID.
+ 11 | REGRESSION SAVE=**.
+ | ^~"
+
+"regression.sps:12.12-12.13: error: REGRESSION: Syntax error expecting VARIABLES, DEPENDENT, ORIGIN, NOORIGIN, METHOD, STATISTICS, or SAVE.
+ 12 | REGRESSION **.
+ | ^~"
+])
+AT_CLEANUP
\ No newline at end of file