Aptech Systems, Inc. Worldwide Headquarters
Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286
Ready to Get Started?
Request Quote & Product Information
Training & Events
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Q&A: Register and Login
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Recent Tagsapplications character vectors CML CMLMT Constrained Optimization datasets dlibrary dllcall error error codes error handling errors Excel file i/o floating network GAUSS Engine GAUSS Light graphics GUI hotkeys installation Java API license licensing linux loading data loops matrices matrix manipulation Maxlik MaxLikMT Memory multidimensional array optimization Optmum output PQG graphics procs RAM random numbers string functions strings structures threading writing data
Time Series 2.0 MT
Find out more now
Time Series MT 2.1
Find out more now
error G0121: Matrix not positive definite
I get the following error when running both "Minimum Lagrange Multiplier Unit Root Test with Two Structural Breaks." and "Minimum Lagrange Multiplier Unit Root Test with Two Structural Breaks."
(0): error G0121: Matrix not positive definite Currently active call: nLMk Stack trace: nLMk
I cant find a fix anywhere and will greatly appreciate if you could help me. My data is as follows:
E 8186.00 8325.00 8382.00 8393.00 8585.00 8735.00 8799.00 8864.00 8938.00 9022.00 9078.00 9131.00 9168.00 9208.00 9244.00 9286.00 9306.00 9347.00 9396.00 9380.00 9260.00 9489.00 10099.00 9868.00 9908.00 9988.00 9963.00 10063.00 10268.00 10523.00 10721.00 10914.00 11532.00 11785.00 13135.00 17928.00 17782.00 20854.00 30712.00 35214.00
Without seeing the code, we cannot give you an exact answer. Most commonly "error G0121 : Matrix not positive definite" occurs when a matrix that is not positive definite is passed to the GAUSS procedure invpd.
Often the line is performing least squares estimation, something like:
b_hat = invpd(X'X)*X'Y;
and the matrix X does not have full rank. This will occur if:
- Two or more of the variables in the model are linearly dependent.
- The model is underdetermined, i.e. there are more variables than observations.
- The original data was loaded incorrectly so that one of the above is true.
I would view your independent and dependent variables after they are loaded to make sure that they are what you would expect. If so, I would check to see if they have full rank with the GAUSS rank function.
One more thing. I notice that at the start of your error message, the line number is 0. This means that the code was not run from a file. This can be because a part of a file was run by highlighting some code and either hitting F4 or selecting "Run selected text". This will also happen if you copy and entire program to the clipboard from another program and paste it into the GAUSS program input/output window. If you are, by chance, performing this second practice, I would strongly recommend that you open the file in GAUSS and run it from there. It will allow GAUSS to give you a specific line number on which the problem is occurring as well as one-click navigation to the location of the error, etc.