REGRESSION: Rename COLLIN to TOL
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 11 Mar 2019 09:10:45 +0000 (10:10 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 12 Mar 2019 16:49:42 +0000 (17:49 +0100)
This is now consistent with other software.

doc/regression.texi
src/language/stats/regression.c
tests/language/stats/regression.at

index 2396e812a7ebdf28e3fd2a7077affa1c5aaea0c2..cc8a206518770a53f61daaf3cb560dca1bbc5dab 100644 (file)
@@ -54,7 +54,7 @@ linear model.
 REGRESSION
         /VARIABLES=@var{var_list}
         /DEPENDENT=@var{var_list}
-        /STATISTICS=@{ALL, DEFAULTS, R, COEFF, ANOVA, BCOV, CI[@var{conf}, COLLIN]@}
+        /STATISTICS=@{ALL, DEFAULTS, R, COEFF, ANOVA, BCOV, CI[@var{conf}, TOL]@}
         @{ /ORIGIN | /NOORIGIN @}
         /SAVE=@{PRED, RESID@}
 @end display
@@ -90,8 +90,8 @@ which must be in parentheses, is the desired confidence level expressed as a per
 Analysis of variance table for the model.
 @item BCOV
 The covariance matrix for the estimated model coefficients.
-@item COLLIN
-The variance inflation factor.  This has no effect unless COEFF is also given.
+@item TOL
+The variance inflation factor and its reciprocal.  This has no effect unless COEFF is also given.
 @item DEFAULT
 The same as if R, COEFF, and ANOVA had been selected.
 This is what you get if the /STATISTICS command is not specified,
index a200cdaadc307dc0038542b548f2208573102f60..8b87b9396cb64b0ae501ba6215fb63a2e15d9aa9 100644 (file)
@@ -60,7 +60,7 @@
 #define STATS_OUTS   8
 #define STATS_CI    16
 #define STATS_BCOV  32
-#define STATS_COLLIN 64
+#define STATS_TOL 64
 
 #define STATS_DEFAULT  (STATS_R | STATS_COEFF | STATS_ANOVA | STATS_OUTS)
 
@@ -309,9 +309,9 @@ cmd_regression (struct lexer *lexer, struct dataset *ds)
                 {
                  statistics |= STATS_BCOV;
                 }
-              else if (lex_match_id (lexer, "COLLIN"))
+              else if (lex_match_id (lexer, "TOL"))
                 {
-                 statistics |= STATS_COLLIN;
+                 statistics |= STATS_TOL;
                 }
               else if (lex_match_id (lexer, "CI"))
                 {
@@ -678,7 +678,7 @@ run_regression_get_models (const struct regression *cmd,
   struct covariance *cov;
   struct casereader *reader;
 
-  if (cmd->stats & STATS_COLLIN)
+  if (cmd->stats & STATS_TOL)
     {
       for (i = 0; i < cmd->n_vars; i++)
        {
@@ -909,7 +909,7 @@ reg_stats_coeff (const struct regression *cmd,
                                     N_("Upper Bound"));
     }
 
-  if (cmd->stats & STATS_COLLIN)
+  if (cmd->stats & STATS_TOL)
     pivot_category_create_group (statistics->root,
                                 N_("Collinearity Statistics"),
                                 N_("Tolerance"), N_("VIF"));
@@ -991,7 +991,7 @@ reg_stats_coeff (const struct regression *cmd,
                              pivot_value_new_number (interval_entries[i]));
        }
 
-      if (cmd->stats & STATS_COLLIN)
+      if (cmd->stats & STATS_TOL)
        {
          assert (c_x);
          double rsq = linreg_ssreg (c_x) / linreg_sst (c_x);
index af49f875843ad48e01713057b19ce8df2d6e9de2..2547fd6529943ae1498a3bad81f323d1630080b4 100644 (file)
@@ -2382,8 +2382,8 @@ Mean time between failures (months) ,3.11,.09,.99,33.39,.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 +2431,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