(New to Eviews) Error with OLS

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

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

(New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 5:26 am

Hi,

I am trying to run a regression of some data, which primarily constitutes of dummy variables.

However, Eviews is rendering an error box upon estimating the equation, and I believe it regards the dummy variables for my years. To clarify: I have observations in my dataset, for which I have created dummy variables for the relevant year, i.e. 2005 (1/0), 2006 (1/0) etc.
(Note: converting to a panel data analysis is not relevant since it actually regards additional variables other than the years)

I am aware that I must leave one of them out, to avoid collinearity. However, even when I do so, I get the error message ("Near singular matrix error. Regressors may be perfectly collinear").

Does anyone perhaps know how to solve this issue so that I can still check for the various years?

Thanks,
Greatly appreciated

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 5:46 am

Start by looking at the correlations among your right hand side variables.

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 5:49 am

I made a correlation matrix of the various years, and no value exceeds 0.17.
Are the various year the right hand side variables you were refering to?

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 5:56 am

Look at all the variables you put on the right.

If that doesn't help find the bug...and it doesn't always...post exact details about your data and the equation you're running.

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 6:41 am

Thank you. To be honest - I am not quite sure what right hand side variables you are referring to.

I have simplified my dataset if you would like to look at it. To clarify I have made the columns in different colors:
Black: dependent variable
Dark blue (hidden): Indep. variables that are functioning fine
Red: One category for which several dummy variables have been made (rendering error in Eviews). Refers to geography
Green: One category for which several dummy variables have been made (rendering error in Eviews). Refers to year of observation

I have also attached the eviews file (which is the result of the import of the excel file).
Thanks a ton for your help

Note: if you run a regression with dependent: "budpremie" and then just the years or the geographies, you will get the error.
Attachments
eviews forum.wf1
(60.32 KiB) Downloaded 207 times
Eviews forum.xlsx
(39.23 KiB) Downloaded 229 times

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 6:50 am

Exactly what regression did you run?

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 6:58 am

Estimate equation - Least squares

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 7:30 am

You know what you did and think the details are obvious. They aren't.

Tell us what the dependent and independent variables are. Perhaps a screen shot of the command you used.

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 8:49 am

Okay sorry about that. I have now attached a screenshot of the variables that we have, as well as a screenshot of the equation window.
I have highlighted the categories (consisting of multiple variables) that are causing the errors.

What's strange is that all the variables starting with "branschtillhorighet" are the same way: dummy variables for which only one of the variables is given value "1" for each observation, with the difference that they actually work, i.e. does not render the error.

Is that more clear?

Thanks again
Attachments
uppsats 1.PNG
uppsats 1.PNG (21.11 KiB) Viewed 7414 times
Uppsats.PNG
Uppsats.PNG (29.44 KiB) Viewed 7414 times

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 9:02 am

The numXXXX variables add to 1.0. So do the country variables. So each set is perfectly multicollinear with the intercept, c. Drop one of numXXX and one country variable and you should be fine.

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 9:22 am

Exactly, that is what I have done with the "branschtillhorighet X", which worked.
The problem with those variables is that even though I do omit one of the variables it still yields the error message.

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 9:29 am

Did you omit one from each set?

froppelina
Posts: 7
Joined: Fri May 05, 2017 3:02 am

Re: (New to Eviews) Error with OLS

Postby froppelina » Wed May 17, 2017 10:09 am

Yes exactly, I omitted NUM2005 and "svenskt"

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

Re: (New to Eviews) Error with OLS

Postby startz » Wed May 17, 2017 10:13 am

Okay, when I ran that on the premium with no other variables, it worked. That suggests that some subset of the other variables also adds up to a constant. Take a look and see if that's the case.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 16 guests