# Independent Variable has same value

i'm doing a regression using EViews, but one of eight independent variable has the same values for all sample and shows near singular matrix error, my supervisor said that it still could be done as she said that a lot a research (especially likert scale) has the same value. Here are the data As you can see the data on the 8th column has the same value. I search the internet but couldn't find a solution, this is my first time doing a regression analysis so maybe i searched the wrong keyword. if really appreciate if someone could help me

Thank you

• If a feature always has the same value, then it provides no information to discriminate between response values. – Dave Jun 19 at 13:22
• I know that it might provides no information, but i'm researching the effect of disclosing integrated reporting elements to firm valuation, there is 8th element, i tried to ignore the 8th element but my supervisor said that i cant do that because it is one of the elements and cant be excluded – Radifan Jun 19 at 13:33
• It makes no sense. Ask your supervisor what exactly did they mean & want you to do, because from purely statistical point of view you should throw it away. – Tim Jun 19 at 13:49
• She told me to ask someone who know statistic well, so I ask here.., I will tell her this then. Thank you – Radifan Jun 19 at 14:08
• Couldn't the constant input serve as a bias term in the regression? – Jayaram Iyer Jun 19 at 14:33

If you think of the "independent" variables as "predictors," then it does no good to include a "predictor" that doesn't differ among cases. That particular "predictor" can't help predict anything, and you can't get a regression coefficient for it.

The Wikipedia entry on simple linear regression, for a single predictor and single outcome, shows the simplest case. The formula for calculating the regression coefficient $$\widehat\beta$$ is:

$$\widehat\beta = \frac{ \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) }{ \sum_{i=1}^n (x_i - \bar{x})^2 } \\[6pt]$$

where $$x_i$$ are the individual predictor values and $$\bar x$$ is their mean. If all of the $$x_i$$ values are the same, then $$(x_i - \bar{x})=0$$ for all cases. Both the numerator and denominator are thus 0; there is no uniquely defined value $$\widehat\beta$$.

It doesn't get any better in the multiple-regression (multiple-predictor) context. For multiple regression to work, the columns of the design matrix need to be linearly independent. That is, you can't be able to write any column as a weighted sum or the other columns, or else you have perfect multicollinearity and an undefined solution. For numeric values like yours, the design matrix is the matrix or predictor values along with a column of 1s representing the model intercept. If one predictor is constant, it thus is a constant multiple of that intercept column in the design matrix. That perfect multicollinearity prevents finding a unique solution to the regression if you include an intercept in the model.

Your sense is correct and, based on what you've presented here, your supervisor is incorrect. Remove such constant "predictors" from your model. If your supervisor insists on claiming that it needs to be included, then in return insist that your supervisor show how to do that in a way that's consistent with the expectations in your field of study. Perhaps there are accepted ways in that field to choose one of the infinite possible solutions in a situation like this, but be sure that you and your supervisor know exactly what you are doing if you go down that route.