Matrix Singular Error

Hi,

I am running a FMOLS and a DOLS estimator to for cointegration with structural breaks and I keep getting the feedback:

'Error Matrix singular'

Can anyone help me determine what I am doing wrong since the FMOLS is working well.

Thank you.

 

2 Answers



0



The error G0048 Matrix singular most often occurs when attempting to either invert a matrix or solve a system of linear equations with a coefficient matrix in which not all of the columns are linearly independent.

Here is a simple example which will cause the problem

//Create a 100x3 random matrix
x = rndn(100, 3);

//Add a fourth column to 'x' which is
//identical to the second column
x = x ~ x[.,2];

//Create a moment matrix
mm = x'x;

//Attempt to invert the singular matrix
mmi = inv(mm);

Sometimes this occurs because some of the variables in the model are very similar. Other times this occurs, because the data was loaded incorrectly. You should add a print statement after the line in which the error occurs to inspect the singular matrix, this may help reveal the problem.

aptech

1,408


0



Thanks

Your Answer


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy