Near Singular Matrix

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

sawaviews
Posts: 2
Joined: Mon Sep 10, 2012 9:53 pm

Near Singular Matrix

Postby sawaviews » Tue Sep 11, 2012 1:18 am

Hi,

I am attempting to build a VECm and have tested all the variables for uroot and then created a VAR. Upon doing so, I then went to test for the appropriate lag length. I tried to run the test with the lag length criteria as 2, but I received the error "near singular matrix" - how do i rectify this? When i test with 1 lag it does not return this error however if i use one lag i am then unable to run the cointegration test as I am informed that I have insufficient observations (which stands at 39 prior to the cointegration test).

Kindly advise of what is happening and how i can rectify it - my econometrics knowledge was fairly basic to begin with and is now rusty!

Thanks.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Near Singular Matrix

Postby EViews Gareth » Tue Sep 11, 2012 7:50 am

If you have insufficient observations with 1 lag, then you probably have it with 2 lags too.

rajiv
Posts: 5
Joined: Fri Aug 03, 2012 10:49 pm

Near Singular Matrix error

Postby rajiv » Sun Sep 16, 2012 5:41 pm

Hi Gareth,
I have a data set of about 500 text files that are forecast numbers for various products. (one file is one product) I have written an eviews program that opens each of these files, runs approximately 24 regressions on each file and prints out the results for these products in a single file. so far so good.
My problem is that I am hitting the near singular matrix error for some data sets. This error is because some of the data sets have perfectly colinear variables.
Can i write code to skip running a particular regression if the data is perfectly colinear?

Is there a way for me to check for these errors in my script. right now the problem is that when i define my equation itself i get the following error : Near singular matrix error. Regressors may be perfectly colinear in "EQUATION EQ6.LS Y C T T^2 Q1 Q2 Q3 Y(-1)"

here is a snippet of the program :
subroutine equation_6(scalar outlier_present, scalar quartertoforecast)

' Create an Equation
equation eq6.ls y c t t^2 q1 q2 q3 y(-1) outlier
'Getting an error on this line itself, need to check fo the singular matrix error before defining the equation itself
string dummy = "Results for Equation 6 : y c t t^2 q1 q2 q3 y(-1) outlier"

Thanks,
Rajiv

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Near Singular Matrix

Postby EViews Gareth » Sun Sep 16, 2012 7:12 pm

Just run your program with the maximum error count set high.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests