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

  • 4
    $\begingroup$ If a feature always has the same value, then it provides no information to discriminate between response values. $\endgroup$ – Dave Jun 19 at 13:22
  • $\begingroup$ 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 $\endgroup$ – Radifan Jun 19 at 13:33
  • 2
    $\begingroup$ 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. $\endgroup$ – Tim Jun 19 at 13:49
  • $\begingroup$ She told me to ask someone who know statistic well, so I ask here.., I will tell her this then. Thank you $\endgroup$ – Radifan Jun 19 at 14:08
  • $\begingroup$ Couldn't the constant input serve as a bias term in the regression? $\endgroup$ – 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.

  • $\begingroup$ Thank you, i will try to tell her about this. $\endgroup$ – Radifan Jun 19 at 13:38

An independent variable with the same values in all observations may serve as a bias for a regression model. Just make sure that the tool you are using is not adding it's own bias feature into the set of independent variables. That should eliminate the singular matrix error which is caused because both your independent variable (having constant values) and the bias feature added by the tool are linearly dependent.

  • $\begingroup$ How to know if the tools is adding bias ? do you happen to know how to enable or disable it in EViews ? $\endgroup$ – Radifan Jun 19 at 13:35
  • 2
    $\begingroup$ The problem is that a constant-predictor column leads to perfect multicollinearity in a design matrix for a model with an intercept, as explained in my answer. An intercept isn't really a bias in the statistical sense, but an integral part of the model representing the baseline outcome value around which the predictors add information. With a constant predictor column, there would be an infinite number of combinations of intercept values and coefficient values for the constant "predictor" consistent with the data--no unique solution. $\endgroup$ – EdM Jun 19 at 15:02
  • $\begingroup$ Thank you for your explanation $\endgroup$ – Radifan Jun 20 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.