fixed check for equality of explanatory and predictor variables
[pspp-builds.git] / src / language / stats / regression.q
index e7ced45ccbb7424f0ccf01ce9acc36de6f67c037..92afb378cea85c45d308d7a38845d2640cb80d68 100644 (file)
@@ -217,9 +217,9 @@ reg_stats_coeff (pspp_linreg_cache * c)
   tab_float (t, 6, 1, 0, pval, 10, 2);
   for (j = 0; j < c->n_coeffs; j++)
     {
-      this_row = j + 2;
       struct string tstr;
       ds_init_empty (&tstr);
+      this_row = j + 2;
 
       v = pspp_coeff_get_var (c->coeff[j], 0);
       label = var_to_string (v);
@@ -797,7 +797,7 @@ identify_indep_vars (const struct variable **indep_vars,
   for (i = 0; i < n_variables; i++)
     if (!is_depvar (i, depvar))
       indep_vars[n_indep_vars++] = v_variables[i];
-  if ((n_indep_vars < 2) && is_depvar (0, depvar))
+  if ((n_indep_vars < 1) && is_depvar (0, depvar))
     {
       /*
        There is only one independent variable, and it is the same