+ reader = casereader_clone (input);
+ for ( ; (c = casereader_read (reader) ); case_unref (c))
+ {
+ int i;
+ for (i = 0; i < cmd->n_vars; ++i)
+ {
+ struct per_var_ws *pvw = &ws.vws[i];
+ covariance_accumulate_pass2 (pvw->cov, c);
+ }
+ }
+ casereader_destroy (reader);
+
+ for (v = 0; v < cmd->n_vars; ++v)
+ {
+ struct per_var_ws *pvw = &ws.vws[v];
+ gsl_matrix *cm = covariance_calculate_unnormalized (pvw->cov);
+ const struct categoricals *cats = covariance_get_categoricals (pvw->cov);
+
+ pvw->sst = gsl_matrix_get (cm, 0, 0);
+
+ reg_sweep (cm, 0);
+
+ pvw->sse = gsl_matrix_get (cm, 0, 0);
+
+ pvw->ssa = pvw->sst - pvw->sse;
+
+ pvw->n_groups = categoricals_total (cats);
+ }