X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fregression.at;h=d487ca8a8becbd7bac7af8e5de3c65798f64f72f;hb=983dc88647eb2826dd866c8109cf3968ce1e79a9;hp=7548160079b2e14d195c16dbe841dd55759fdcdf;hpb=22c3b7ae0807d55ac6714d1f7ca9c5a5be6cc515;p=pspp diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index 7548160079..d487ca8a8b 100644 --- a/tests/language/stats/regression.at +++ b/tests/language/stats/regression.at @@ -4,6 +4,7 @@ AT_SETUP([LINEAR REGRESSION - basic]) AT_DATA([regression.sps], [dnl set format = F22.3. data list notable list / v0 to v2. +filter by v0. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 @@ -21,6 +22,8 @@ list. ]) 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. + Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 @@ -2127,3 +2130,77 @@ Table: Coefficients (science) AT_CLEANUP + + +dnl Checks for regression against bug #44877. +AT_SETUP([LINEAR REGRESSION crash with long string variables]) +AT_DATA([regression.sps], [dnl +SET DECIMAL=DOT. + +DATA LIST notable LIST /text (A24) Y * X1 * +BEGIN DATA. +V00276601 0.00 90.00 +V00292909 10.00 30.00 +V00291204 20.00 20.00 +V00300070 0.00 90.00 +END DATA. + +REGRESSION +/VARIABLES= Y +/DEPENDENT= X1 +/METHOD=ENTER +/STATISTICS=COEFF R ANOVA +/SAVE= RESID. + +LIST. +]) +AT_CHECK([pspp -o pspp.csv regression.sps]) +AT_CHECK([cat pspp.csv], [0], [dnl +Table: Model Summary (X1) +,R,R Square,Adjusted R Square,Std. Error of the Estimate +,.95,.89,.84,15.08 + +Table: ANOVA (X1) +,,Sum of Squares,df,Mean Square,F,Sig. +,Regression,3820.45,1,3820.45,16.81,.055 +,Residual,454.55,2,227.27,, +,Total,4275.00,3,,, + +Table: Coefficients (X1) +,,Unstandardized Coefficients,,Standardized Coefficients,, +,,B,Std. Error,Beta,t,Sig. +,(Constant),85.45,10.16,.00,8.41,.004 +,Y,-3.73,.91,-.95,-4.10,.055 + +Table: Data List +text,Y,X1,RES1 +V00276601 ,.00,90.00,4.55 +V00292909 ,10.00,30.00,-18.18 +V00291204 ,20.00,20.00,9.09 +V00300070 ,.00,90.00,4.55 +]) +AT_CLEANUP + + +dnl Test for a crash which happened on bad input syntax +AT_SETUP([LINEAR REGRESSION -- Empty Parentheses]) + +AT_DATA([empty-parens.sps], [dnl +set format = F22.3. + +data list notable list /math female socst read science * +begin data. + 58.00 1.00 61.00 55.00 58.00 + 65.00 1.00 61.00 63.00 53.00 +end data. + +regression + /variables = math female socst read + /statistics = coeff r anova ci () + /dependent = science + /method = enter +]) + +AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore]) + +AT_CLEANUP