X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Flanguage%2Fstats%2Fregression.at;h=686c4edd6a92a61f46fb08735a42f10216aaceb1;hb=a1dce2d1e00f0c2b5d670960f8ad432d7db3333b;hp=af49f875843ad48e01713057b19ce8df2d6e9de2;hpb=d983263edf596ae855af70d0580b7406f8be4268;p=pspp diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index af49f87584..686c4edd6a 100644 --- a/tests/language/stats/regression.at +++ b/tests/language/stats/regression.at @@ -1,16 +1,16 @@ dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. -dnl +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 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 dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl @@ -38,7 +38,9 @@ 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. +"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 @@ -176,7 +178,7 @@ data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 0). -regression +regression /variables = x0 x1 /dependent = y /statistics = all @@ -197,7 +199,7 @@ data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 1). -regression +regression /variables = x0 x1 /dependent = y /statistics = all @@ -218,7 +220,7 @@ data list notable file='regdata.txt' list /g x0 x1 y err *. split file by g. -regression +regression /variables = x0 x1 /dependent = y /statistics = all @@ -254,7 +256,7 @@ end loop. end file. end input program. -regression +regression /variables = x0 x1 /dependent = y ycopy /statistics = default. @@ -1905,7 +1907,7 @@ AT_CHECK([pspp ss.sps], [1], [ignore]) AT_CLEANUP -dnl The following example comes from +dnl The following example comes from dnl http://www.ats.ucla.edu/stat/spss/output/reg_spss%28long%29.htm AT_SETUP([LINEAR REGRESSION coefficient confidence interval]) @@ -2120,7 +2122,7 @@ regression /variables = math female socst read /statistics = coeff r anova ci (95) /dependent = science - /method = enter + /method = enter ]) AT_CHECK([pspp -O format=csv conf.sps], [0], [dnl @@ -2219,7 +2221,7 @@ regression AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore]) -AT_CLEANUP +AT_CLEANUP @@ -2230,25 +2232,25 @@ SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA - 16 7.25 - 0 .00 - 1 .10 - 9 27.9 - 0 .00 - 7 3.65 - 14 16.8 - 24 9.15 - 0 .00 - 24 19.0 - 7 4.05 - 12 7.90 - 6 .75 - 11 1.40 - 0 .00 - 3 2.30 - 12 7.60 - 11 6.80 - 16 8.65 + 16 7.25 + 0 .00 + 1 .10 + 9 27.9 + 0 .00 + 7 3.65 + 14 16.8 + 24 9.15 + 0 .00 + 24 19.0 + 7 4.05 + 12 7.90 + 6 .75 + 11 1.40 + 0 .00 + 3 2.30 + 12 7.60 + 11 6.80 + 16 8.65 END DATA. REGRESSION @@ -2276,7 +2278,7 @@ Table: Coefficients (value) number,.611,.192,.612,3.189,.005 ]) -AT_CLEANUP +AT_CLEANUP @@ -2286,25 +2288,25 @@ SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA - 16 7.25 - 0 .00 - 1 .10 - 9 27.9 - 0 .00 - 7 3.65 - 14 16.8 - 24 9.15 - 0 .00 - 24 19.0 - 7 4.05 - 12 7.90 - 6 .75 - 11 1.40 - 0 .00 - 3 2.30 - 12 7.60 - 11 6.80 - 16 8.65 + 16 7.25 + 0 .00 + 1 .10 + 9 27.9 + 0 .00 + 7 3.65 + 14 16.8 + 24 9.15 + 0 .00 + 24 19.0 + 7 4.05 + 12 7.90 + 6 .75 + 11 1.40 + 0 .00 + 3 2.30 + 12 7.60 + 11 6.80 + 16 8.65 END DATA. REGRESSION @@ -2332,7 +2334,7 @@ Table: Coefficients (value) number,.672,.118,.802,5.699,.000 ]) -AT_CLEANUP +AT_CLEANUP dnl This is an example from doc/tutorial.texi dnl So if the results of this have to be changed in any way, @@ -2344,46 +2346,47 @@ GET FILE='repairs.sav'. 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_SETUP([LINEAR REGRESSION collinearity]) -AT_DATA([regression-collin.sps], [dnl +AT_SETUP([LINEAR REGRESSION vif]) +AT_DATA([regression-vif.sps], [dnl SET FORMAT=F10.3. data list notable list /competence_x1 motivation_x2 performance_y. @@ -2431,13 +2434,13 @@ begin data end data. regression /variables=competence_x1 motivation_x2 - /statistics=defaults collin + /statistics=defaults tol /dependent=performance_y . ]) -AT_CHECK([pspp -O format=csv regression-collin.sps], [0], [dnl +AT_CHECK([pspp -O format=csv regression-vif.sps], [0], [dnl Table: Model Summary (performance_y) R,R Square,Adjusted R Square,Std. Error of the Estimate .785,.616,.595,2.980