Make q2c link under mingw32, by eliminating the dependency on
[pspp] / src / language / stats / regression.q
index a5851ff34e4857b2ee086ee8a630ffb9de7091c9..4679d075eb638cb7a5cabeae4028ec8e19318e30 100644 (file)
@@ -269,7 +269,7 @@ reg_stats_coeff (pspp_linreg_cache * c)
       /*
          P values for the test statistic above.
        */
-      pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), 1.0);
+      pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), (double) (c->n_obs - c->n_coeffs));
       tab_float (t, 6, j + 1, 0, pval, 10, 2);
     }
   tab_title (t, _("Coefficients"));
@@ -765,8 +765,8 @@ reg_print_categorical_encoding (FILE * fp, pspp_linreg_cache * c)
 
   for (i = 0; i < n_vars; i++)
     {
-      size_t n_categories = cat_get_n_categories (varlist[i]);
-      size_t j;
+      int n_categories = cat_get_n_categories (varlist[i]);
+      int j;
       
       fprintf (fp, "%s.name = \"%s\";\n\t",
                var_get_name (varlist[i]),