Hi Rick, I'd like to know how to reduce columns that are linear combinations of others and make the crossproduct of design matrix non-singular.

I am think of using the following method:

Suppose x is the design matrix:

call qr(q, r, piv, lindep, x);
x = x[, piv[1: lindep]];