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.
Near Singular Matrix
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Near Singular Matrix
If you have insufficient observations with 1 lag, then you probably have it with 2 lags too.
Near Singular Matrix error
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
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
Just run your program with the maximum error count set high.
Who is online
Users browsing this forum: No registered users and 2 guests
