(New to Eviews) Error with OLS
Moderators: EViews Gareth, EViews Moderator
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
(New to Eviews) Error with OLS
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
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
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
Start by looking at the correlations among your right hand side variables.
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
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?
Are the various year the right hand side variables you were refering to?
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
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.
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.
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
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.
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
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
Exactly what regression did you run?
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
Estimate equation - Least squares
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
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.
Tell us what the dependent and independent variables are. Perhaps a screen shot of the command you used.
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
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
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 (21.11 KiB) Viewed 7414 times
-
- Uppsats.PNG (29.44 KiB) Viewed 7414 times
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
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.
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
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.
The problem with those variables is that even though I do omit one of the variables it still yields the error message.
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
Did you omit one from each set?
-
- Posts: 7
- Joined: Fri May 05, 2017 3:02 am
Re: (New to Eviews) Error with OLS
Yes exactly, I omitted NUM2005 and "svenskt"
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: (New to Eviews) Error with OLS
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.
Who is online
Users browsing this forum: No registered users and 16 guests