Page 1 of 1

(New to Eviews) Error with OLS

Posted: Wed May 17, 2017 5:26 am
by froppelina
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

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 5:46 am
by startz
Start by looking at the correlations among your right hand side variables.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 5:49 am
by froppelina
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?

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 5:56 am
by startz
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.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 6:41 am
by froppelina
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.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 6:50 am
by startz
Exactly what regression did you run?

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 6:58 am
by froppelina
Estimate equation - Least squares

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 7:30 am
by startz
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.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 8:49 am
by froppelina
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

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 9:02 am
by startz
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.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 9:22 am
by froppelina
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.

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 9:29 am
by startz
Did you omit one from each set?

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 10:09 am
by froppelina
Yes exactly, I omitted NUM2005 and "svenskt"

Re: (New to Eviews) Error with OLS

Posted: Wed May 17, 2017 10:13 am
by startz
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.