I am getting Warning: X is rank deficient to within machine precision. Adittionally, the coefficients I am getting are complex numbers, even though the input is all real. Why is this happening? Any idea how to get out of this?
I am getting Warning: X is rank deficient to within machine precision. Adittionally, the
Share
I suppose that your input vector has too many linearly dependent columns. Do a
rank(input)and see what the output says. If it’s less than 8, you need to remove some of your independent variables that are found in yourinputmatrix. Also, you may want to include more information on how you arrived at yourinputmatrix like:If you have a low rank matrix, try to find the dependent columns. Here’s a quick way, that I would recommend(I’m sure someone knows of a better):
Should give you a matrix with
rank(full_rank_input) == num_columns.