X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fregression.at;h=a3a8d908a1e7dfd0cfff618649be1e2907841e3b;hb=5d612c43713291cae1aa473ee3d31786ef6f5b99;hp=1fc5662da03e4c0e7af55a8c3623fc139aed469e;hpb=5cab4cf3322f29c0ed7134d23740e07382914f20;p=pspp diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index 1fc5662da0..a3a8d908a1 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 @@ -176,7 +176,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 +197,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 +218,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 +254,7 @@ end loop. end file. end input program. -regression +regression /variables = x0 x1 /dependent = y ycopy /statistics = default. @@ -1905,7 +1905,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 +2120,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 +2219,7 @@ regression AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore]) -AT_CLEANUP +AT_CLEANUP @@ -2230,25 +2230,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 +2276,7 @@ Table: Coefficients (value) number,.611,.192,.612,3.189,.005 ]) -AT_CLEANUP +AT_CLEANUP @@ -2286,25 +2286,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 +2332,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, @@ -2380,3 +2380,80 @@ Table: Coefficients (Mean time to repair (hours) ) Mean time between failures (months) ,3.11,.09,.99,33.39,.000 ]) AT_CLEANUP + + +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. +begin data +32 34 36 +35 37 39 +38 45 49 +31 41 41 +36 40 38 +32 38 36 +33 39 37 +31 40 41 +30 37 40 +35 37 43 +31 34 36 +34 32 35 +31 42 34 +25 36 40 +35 42 40 +36 41 44 +30 38 32 +34 41 41 +34 41 44 +22 27 26 +27 26 33 +30 30 35 +30 35 37 +37 39 44 +29 35 36 +31 35 29 +31 45 41 +29 30 32 +29 35 36 +31 37 37 +36 45 42 +32 44 39 +27 26 31 +33 39 35 +20 25 28 +30 36 39 +27 37 39 +25 39 36 +32 38 38 +32 38 35 +end data. + +regression /variables=competence_x1 motivation_x2 + /statistics=defaults tol + /dependent=performance_y + . +]) + + +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 + +Table: ANOVA (performance_y) +,Sum of Squares,df,Mean Square,F,Sig. +Regression,526.494,2,263.247,29.641,.000 +Residual,328.606,37,8.881,, +Total,855.100,39,,, + +Table: Coefficients (performance_y) +,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.,Collinearity Statistics, +,B,Std. Error,Beta,,,Tolerance,VIF +(Constant),7.220,4.020,.000,1.796,.080,, +competence_x1,.432,.166,.358,2.609,.013,.552,1.812 +motivation_x2,.453,.125,.499,3.636,.001,.552,1.812 +]) + +AT_CLEANUP