Computes a generalized sweep inverse.
Parameters: x (NxN matrix) – data Returns: xig (NxN matrix) – the generalized inverse of x.
x and xig will satisfy the two conditions:
- \(x*xig*x = x\)
- \(xig*x*xig = y\)
invswp() returns a row and column with zeros when the pivot fails. This is
good for quadratic forms since it essentially removes rows with
redundant information, i.e., the statistics generated will be “correct”
but with reduced degrees of freedom.