+static pspp_linreg_cache *
+fit_model (const struct covariance_matrix *cov,
+ const struct variable *dep_var,
+ const struct variable ** indep_vars,
+ size_t n_data, size_t n_indep)
+{
+ pspp_linreg_cache *result = NULL;
+ result = pspp_linreg_cache_alloc (dep_var, indep_vars, n_data, n_indep);
+ coeff_init (result, covariance_to_design (cov));
+ pspp_linreg_with_cov (cov, result);
+
+ return result;