I've a systems equation which keeps showing up on estimation as a near singular matrix but on a colleagues machine it worked.
We thought initially it was different version (the colleague where it worked had Enterprise) so we all went and purchased Enterprise.
I ran the model and upon estimation it still showed a near singular error.
I fiddled around with the model and the data trying to find out where and what was causing the problem.
Then for no apparent reason it worked on my computer. I saved the file in a different name.
I've now what seems to be two identical files- same data, same models one works but one crashes with 'near singular matrix'.
I can cut and paste the system specification from the file that doesn't work into the file that works and it works. If I cut and paste the system specification from the file that works into the file that doesn't it doesn't work. Nothing else between the two files is different.
I've sent the working file to another colleague and she has the same issue- one file works while the other doesn't.
We are running the system in a seemingly unrelated regression setting.
* the system imposes a highly non-linear cross-equation restriction
* some of the Dependent Variables in the system have high pairwise correlations (ie > 90%)
Its causing us to lose confidence in Eviews as it seems to be a glitch in the program somewhere- we are hoping someone can help.
Regards
Barry
Near Singular Matrix but then it works
Moderators: EViews Gareth, EViews Moderator
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix but then it works
First check: be sure all the starting values for the estimation are the same.
-
BarryOliver
- Posts: 7
- Joined: Wed Jun 01, 2011 5:46 pm
Re: Near Singular Matrix but then it works
Re first check: everything between the two files seems identical.
if I copy this specification:
excess_totmkau=c(3)+c(4)*excess_world
excess_bmatrau=c(1)*(1-c(11))+c(2)*c(12)+c(11)*excess_world+c(12)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_cnsmgau=c(1)*(1-c(21))+c(2)*c(22)+c(21)*excess_world+c(22)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_cnsmsau=c(1)*(1-c(31))+c(2)*c(32)+c(31)*excess_world+c(32)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_finanau=c(1)*(1-c(41))+c(2)*c(42)+c(41)*excess_world+c(42)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_hlthcau=c(1)*(1-c(51))+c(2)*c(52)+c(51)*excess_world+c(52)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_indusau=c(1)*(1-c(61))+c(2)*c(62)+c(61)*excess_world+c(62)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_oilgsau=c(1)*(1-c(71))+c(2)*c(72)+c(71)*excess_world+c(72)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_tecnoau=c(1)*(1-c(81))+c(2)*c(82)+c(81)*excess_world+c(82)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_telcmau=c(1)*(1-c(91))+c(2)*c(92)+c(91)*excess_world+c(92)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_utilsau=c(1)*(1-c(101))+c(2)*c(102)+c(101)*excess_world+c(102)*(excess_totmkau-(c(3)+c(4)*excess_world))
into one file it works while the other it doesn't everything else between the files is the same.
if I copy this specification:
excess_totmkau=c(3)+c(4)*excess_world
excess_bmatrau=c(1)*(1-c(11))+c(2)*c(12)+c(11)*excess_world+c(12)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_cnsmgau=c(1)*(1-c(21))+c(2)*c(22)+c(21)*excess_world+c(22)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_cnsmsau=c(1)*(1-c(31))+c(2)*c(32)+c(31)*excess_world+c(32)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_finanau=c(1)*(1-c(41))+c(2)*c(42)+c(41)*excess_world+c(42)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_hlthcau=c(1)*(1-c(51))+c(2)*c(52)+c(51)*excess_world+c(52)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_indusau=c(1)*(1-c(61))+c(2)*c(62)+c(61)*excess_world+c(62)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_oilgsau=c(1)*(1-c(71))+c(2)*c(72)+c(71)*excess_world+c(72)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_tecnoau=c(1)*(1-c(81))+c(2)*c(82)+c(81)*excess_world+c(82)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_telcmau=c(1)*(1-c(91))+c(2)*c(92)+c(91)*excess_world+c(92)*(excess_totmkau-(c(3)+c(4)*excess_world))
excess_utilsau=c(1)*(1-c(101))+c(2)*c(102)+c(101)*excess_world+c(102)*(excess_totmkau-(c(3)+c(4)*excess_world))
into one file it works while the other it doesn't everything else between the files is the same.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix but then it works
Did you explicitly compare the values stored in the C vector in each file just before running the estimate? (If they're the same, then my guess was a red herring.)
-
BarryOliver
- Posts: 7
- Joined: Wed Jun 01, 2011 5:46 pm
Re: Near Singular Matrix but then it works
I'm unsure how to explicitly compare the values stored in the C vector of each file.
But I'm happy to do this if you'll tell me how.
Thanks in advance!
But I'm happy to do this if you'll tell me how.
Thanks in advance!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Near Singular Matrix but then it works
Just double click on C prior to estimation.
-
BarryOliver
- Posts: 7
- Joined: Wed Jun 01, 2011 5:46 pm
Re: Near Singular Matrix but then it works
The plot thickens...the constant (c) values in each file are different...when I copy the values for c into the file that doesn't work...it works.
So obviously you have hit the nail on the head.
It seems that the values of the c are important in getting the system equation to run.
It seems the only reason I got it to run in one file was that I fiddled with the model by deleting variables until I got it to work- however, I needed to get it to change the values in c enough, just getting a modified model to work wasn't enough. A model needed to be specified enough to change the c values by a sufficient amount to get my whole model to run.
However, what I've now done is to create a new workfile and copied all the data into this new workfile (the c values are all zero for the new workfile as happens when you start a new file). I created a new system object and copied the specs from my original file and when I run it I get the NSM error...my question is if I were setting up the data from scratch and the systems from scratch I can never get it to run unless i fiddle around with it until it runs and changes the c values enough.
How come it won't run from a new file?
Maybe I don't know enough about the c object and its purpose...
So obviously you have hit the nail on the head.
It seems that the values of the c are important in getting the system equation to run.
It seems the only reason I got it to run in one file was that I fiddled with the model by deleting variables until I got it to work- however, I needed to get it to change the values in c enough, just getting a modified model to work wasn't enough. A model needed to be specified enough to change the c values by a sufficient amount to get my whole model to run.
However, what I've now done is to create a new workfile and copied all the data into this new workfile (the c values are all zero for the new workfile as happens when you start a new file). I created a new system object and copied the specs from my original file and when I run it I get the NSM error...my question is if I were setting up the data from scratch and the systems from scratch I can never get it to run unless i fiddle around with it until it runs and changes the c values enough.
How come it won't run from a new file?
Maybe I don't know enough about the c object and its purpose...
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix but then it works
Two thoughts:
(1) The C vector stores the values c(1), c(2), etc. EViews uses whatever is in those values to start the estimation and then when it's done, leaves the final estimated values there. Nonlinear estimates are path dependent in the iteration space. Sometimes you have to try different starting values to get a proper estimate.
(2) excess_totmkau is a left-hand side variable in the first equaton and a RHS variable in the others. If excess_totmkau is endogenous, then SUR is probably not a valid estimation technique.
(1) The C vector stores the values c(1), c(2), etc. EViews uses whatever is in those values to start the estimation and then when it's done, leaves the final estimated values there. Nonlinear estimates are path dependent in the iteration space. Sometimes you have to try different starting values to get a proper estimate.
(2) excess_totmkau is a left-hand side variable in the first equaton and a RHS variable in the others. If excess_totmkau is endogenous, then SUR is probably not a valid estimation technique.
-
BarryOliver
- Posts: 7
- Joined: Wed Jun 01, 2011 5:46 pm
Re: Near Singular Matrix but then it works
Well thank you very much for your comments. I shall have to speak with my colleagues regarding what we now need to do.
I think our confidence in Eviews is being restored!
My initial thoughts are to do a test for endogeniety (Hausman) and go from there or change our model. Anyway, that's not relevant here in this thread.
Many thanks for your help.
I think our confidence in Eviews is being restored!
My initial thoughts are to do a test for endogeniety (Hausman) and go from there or change our model. Anyway, that's not relevant here in this thread.
Many thanks for your help.
Who is online
Users browsing this forum: No registered users and 2 guests
