- assert (c_x);
- double rsq = linreg_ssreg (c_x) / linreg_sst (c_x);
-
- double collin_entries[] = {
- 1.0 - rsq,
- 1.0 / (1.0 - rsq),
- };
-
- for (size_t i = 0; i < sizeof collin_entries / sizeof *collin_entries; i++)
- pivot_table_put2 (table, col++, var_idx,
- pivot_value_new_number (collin_entries[i]));
+ {
+ struct linreg *m = mc[j].models[0];
+ double rsq = linreg_ssreg (m) / linreg_sst (m);
+ pivot_table_put2 (table, col++, var_idx, pivot_value_new_number (1.0 - rsq));
+ pivot_table_put2 (table, col++, var_idx, pivot_value_new_number (1.0 / (1.0 - rsq)));
+ }