I have a matrix, $X'X$, which is singular meaning that I cannot invert it. I need the inverse of this matrix to perform two independent things. I need it for the design of experiments, in R using optFederov() algorithm. Also I need it invertible for OLS.
I believe the two possible sources of singularity are:
1.- Many points lying in the same plane
2.- There are linear combinations between columns
I think it is the first problem. To solve the problem I have added very small random noise to each value of x, $x_{i}$, from a Normal Distribution such that $x_{i,noise} \sim N(0,0.001)$.
Apparently this trick makes the matrix invertible. However, I am not sure if this is a good approach. My thought is that it is good for OLS given that the esitmators will change veeery little, but not sure on the design of experiments, for example using a D-Efficiency design.
I would appreciate some suggestion regarding whether this is a good way to proceed or not!