(psppire_selector_set_subjects): Add an
[pspp-builds.git] / src / math / linreg / predict.c
index 06576d057d52cb9d05bdb6b119de35788375ee07..7f404fcf5e575ff212ae7520fc7370af71e17e41 100644 (file)
@@ -18,8 +18,9 @@
    Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
  */
 
+#include <config.h>
 #include <math/linreg/linreg.h>
-#include <math/linreg/coefficient.h>
+#include <math/coefficient.h>
 #include <gl/xalloc.h>
 
 /*
@@ -35,8 +36,8 @@ pspp_linreg_predict (const struct variable **predictors,
   const pspp_linreg_cache *c = c_;
   int i;
   int j;
-  const struct pspp_linreg_coeff **found;
-  const struct pspp_linreg_coeff *coe;
+  const struct pspp_coeff **found;
+  const struct pspp_coeff *coe;
   double result;
   double tmp;
 
@@ -69,8 +70,8 @@ pspp_linreg_predict (const struct variable **predictors,
       if (i < c->n_coeffs)
        {
          found[i] = coe;
-         tmp = pspp_linreg_coeff_get_est (coe);
-         if (predictors[j]->type == NUMERIC)
+         tmp = pspp_coeff_get_est (coe);
+         if (var_is_numeric (predictors[j]))
            {
              tmp *= vals[j]->f;
            }