From: John Darrington Date: Mon, 11 Mar 2019 09:10:45 +0000 (+0100) Subject: REGRESSION: Rename COLLIN to TOL X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e33eee392ee8e393e757341876b3ebc6c4e7a12;p=pspp REGRESSION: Rename COLLIN to TOL This is now consistent with other software. --- diff --git a/doc/regression.texi b/doc/regression.texi index 2396e812a7..cc8a206518 100644 --- a/doc/regression.texi +++ b/doc/regression.texi @@ -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, diff --git a/src/language/stats/regression.c b/src/language/stats/regression.c index a200cdaadc..8b87b9396c 100644 --- a/src/language/stats/regression.c +++ b/src/language/stats/regression.c @@ -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); diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index af49f87584..2547fd6529 100644 --- a/tests/language/stats/regression.at +++ b/tests/language/stats/regression.at @@ -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