+ size_t n_vals;
+ struct reg_trns *trns = t_;
+ pspp_linreg_cache *model;
+ union value *output = NULL;
+ const union value **vals = NULL;
+ const struct variable **vars = NULL;
+
+ assert (trns != NULL);
+ model = trns->c;
+ assert (model != NULL);
+ assert (model->depvar != NULL);
+ assert (model->pred != NULL);
+
+ vars = xnmalloc (model->n_coeffs, sizeof (*vars));
+ n_vals = (*model->get_vars) (model, vars);
+
+ vals = xnmalloc (n_vals, sizeof (*vals));
+ output = case_data_rw (c, model->pred);
+ assert (output != NULL);
+
+ for (i = 0; i < n_vals; i++)
+ {
+ vals[i] = case_data (c, vars[i]);
+ }
+ output->f = (*model->predict) ((const struct variable **) vars,
+ vals, model, n_vals);
+ free (vals);
+ free (vars);
+ return TRNS_CONTINUE;
+}
+
+/*
+ Gets the residuals.
+ */
+static int
+regression_trns_resid_proc (void *t_, struct ccase *c,
+ casenumber case_idx UNUSED)
+{
+ size_t i;
+ size_t n_vals;
+ struct reg_trns *trns = t_;
+ pspp_linreg_cache *model;
+ union value *output = NULL;