Near singular matrix: wrong import of data?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Momentum
Posts: 6
Joined: Tue Apr 12, 2016 10:37 am

Near singular matrix: wrong import of data?

Postby Momentum » Thu May 26, 2016 5:45 am

Hi there, I'm doing a panel data regression with both time- as cross-section fixed effects. However, I get a near singular matrix error and I have the idea that that is because I imported my data wrongly. Simply said, I am measuring the influence of past stock performance on future stock performance, with macroeconomic control variables. Assume that I have three stocks and three months data (obviously, I use much more), my excel file (before importing in eviews) looks like this:

Stock - Month - Past performance - Future performance - Economic Variable
A Jan 3 5 6
B Jan -1 2 6
C Jan 0 1 6
A Feb 9 2 4.5
B Feb 3 8 4.5
C Feb 4 3 4.5
A Mar 6 2 8
B Mar 3 0 8
C Mar 2 9 8

As you can see, the last column is per month the same for every stock, which I think causes the near singular matrix error. Do you think the same? Am I organising my data correctly, or should I do this differently? Thanks a lot!

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Near singular matrix: wrong import of data?

Postby startz » Thu May 26, 2016 6:14 am

You've correctly identified the problem. But if that's the data you have the issue isn't importing, it's that you can't have the last variable and also use time fixed effects.

Momentum
Posts: 6
Joined: Tue Apr 12, 2016 10:37 am

Re: Near singular matrix: wrong import of data?

Postby Momentum » Thu May 26, 2016 6:27 am

Thanks for your reply! So what would be the solution? How else can I control for time-fixed effects?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Near singular matrix: wrong import of data?

Postby startz » Thu May 26, 2016 6:31 am

The last variable will pick up all time fixed effects - so it can't be interpreted as just the "Economic variable" effect. Or you can leave it out and put the time fixed effects back in.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 50 guests