1
$\begingroup$

Using the statsmodels OLS and checking the coefficients of the independent variables, some had negative coefficients. How to interpret them exactly?

Context: In a dataset with ecommerce transactional data, I used the revenue from the datapoint period, the average amount sold by the datapoint store and the average revenue from the datapoint store.

The datapoint store's average revenue coefficient was negative. What does it mean ?

edit: The values of x and y are in natural logarithm in the model.

$\endgroup$
0

1 Answer 1

3
$\begingroup$

Linear regression parameters are not the same as the importance of the parameters. First, the scale of the parameters depends on the scale of the features, so to use it as an important measure you need to scale the features. Second, as you noticed, the coefficients can be either positive or negative, and obviously "negative importance" is rather meaningless. When the coefficient has a positive sign it means that the predictions raise as the values of the feature raise, while with a negative sign the predictions decrease as the values of the feature raise. Moreover, keep in mind that you cannot interpret those parameters independently of other parameters in the model.

$\endgroup$
7
  • $\begingroup$ The features are scaled in natural logarithm (for the variation of larger values ​​to be the same as for smaller values, for example from 1 to 2 there was an increase of 100%, but from 100 to 101 it was 1%). I saw that the average revenue for the period is correlated with the revenue from the point of sale, but I didn't understand the relative relationship of the features since the second one is negative. $\endgroup$
    – Alysson
    Commented Feb 17, 2022 at 21:15
  • 1
    $\begingroup$ In the log-log model, the parameters are elasticities. As in the answer, elasticities can be negative. $\endgroup$
    – Josef
    Commented Feb 18, 2022 at 13:31
  • 1
    $\begingroup$ @Alysson correlation does not take into account the other variables you included in the model. $\endgroup$
    – Tim
    Commented Feb 18, 2022 at 18:28
  • 1
    $\begingroup$ standard case simpson's paradox en.wikipedia.org/wiki/Simpson%27s_paradox Your description of the regression is not clear enough to guess for a reason why it might be negative, e.g. revenue of store is low because it had many sales at lower prices, but that increased the purchases of those that did buy. $\endgroup$
    – Josef
    Commented Feb 18, 2022 at 22:50
  • 1
    $\begingroup$ @Alysson check stats.stackexchange.com/a/557940/35989 $\endgroup$
    – Tim
    Commented Feb 18, 2022 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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