work.warn_bad_weight = true;
work.cats = NULL;
work.beta_hat = NULL;
+ work.hessian = NULL;
/* Get the initial estimates of \beta and their standard errors.
And perform other auxilliary initialisation. */
if (! initial_pass (cmd, &work, input))
- return false;
+ goto error;
for (i = 0; i < cmd->n_cat_predictors; ++i)
{
msg (ME, _("Category %s does not have at least two distinct values. Logistic regression will not be run."),
ds_cstr(&str));
ds_destroy (&str);
- return false;
+ goto error;
}
}
if (converged)
break;
}
- casereader_destroy (input);
+
if ( ! converged)
output_classification_table (cmd, &work);
output_variables (cmd, &work);
+ casereader_destroy (input);
gsl_matrix_free (work.hessian);
gsl_vector_free (work.beta_hat);
-
categoricals_destroy (work.cats);
return true;
+
+ error:
+ casereader_destroy (input);
+ gsl_matrix_free (work.hessian);
+ gsl_vector_free (work.beta_hat);
+ categoricals_destroy (work.cats);
+
+ return false;
}
struct variable_node