1
$\begingroup$

As I understand it, the skewness of the response variable in a linear regression does not need to be normal (only the residuals need to be normally distributed). However, I was generally wondering if I can log-transform my response variable so its distribution becomes more normal prior to regression and if this has any benefits/drawbacks.

For context, my response variable y is Medicaid coverage, which has a right-skew in the state I am analyzing. If I log transform this variable using np.log(y + 1), the distribution looks approximately normal. I was wondering if this would be appropriate for a linear regression, or if I don't even need to do this/it is bad practice to do this.

$\endgroup$
9
  • 4
    $\begingroup$ log(y + 1) is bad practice because it is not scale-invariant; your conclusions should be the same regardless of whether coverage is in dollars or thousands of dollars (or whatever units you are using), but this is not true for this transformation. $\endgroup$
    – Noah
    Mar 22, 2022 at 7:06
  • $\begingroup$ Could you elaborate on what you mean by scale-invariant? @Noah $\endgroup$
    – prismarine
    Mar 22, 2022 at 7:08
  • $\begingroup$ If you use generalized linear models with logarithmic link, then zeros are tolerated because the assumption is that the mean function is positive, not that all the data are. On the other hand, if you have lots of zeros, then you're perhaps looking at a zero-inflated response. $\endgroup$
    – Nick Cox
    Mar 22, 2022 at 7:18
  • 1
    $\begingroup$ @homoscedasexual Stated again, your conclusions should be the same whether you measured coverage as individuals covered per 100,000 or individuals covered per 1,000. Using log(y + 1) means that your results will change depending on your scale (i.e., because 1 + 4316 is different from 1 + 43.16). Scale invariant means the conclusions do not depend on the scale of the variable (e.g., whether distance is measured in feet, inches, or meters or whether dollars is measured in thousands or millions). $\endgroup$
    – Noah
    Mar 22, 2022 at 20:43
  • 1
    $\begingroup$ Log of proportion can sometmes make sense, but you have the same problem with zeros. Again, generalized linear models with logit link may help here. $\endgroup$
    – Nick Cox
    Mar 23, 2022 at 10:34

2 Answers 2

2
$\begingroup$

In classical regression, there are no normality assumptions about the distribution of predictors in the regression or even the response (Y). All assumptions are based on residuals. It is assumed that the residuals should be approximately normal. Transforming the predictors or outcome might alter the distribution of residuals. Look for the influential observations using Cook's distance to see if any of your extreme values have high influence. Transformations are good whenever u have a meaningful interpretation, for instance, the log transform and reciprocal are often useful depending on context.

$\endgroup$
0
$\begingroup$

Adding 1 before taking the log is not great because of the reasons identified in the comments.

However, I'm guessing your DV is measured per county or something like that. It's unlikely you have actual 0s. A county in which not one person has Medicaid? I mean, I suppose it's possible (there are some very small counties) but, in that case, I'd combine neighboring counties.

But why take logs? One reason is if our interest is in multiplicative rather than additive notions of the DV. This frequently happens with money variables. We think about raises, or price increases, or whatever, in % terms, not amount terms. \$5 off on a car is meaningless. \$5 off on a sandwich is amazing.

How about your case? Are you interested in what causes the Medicaid coverage rate to increase by a fixed amount, or a fixed ratio? Is a change from 10 to 20 the same as one from 20 to 30? Or is it the same as one from 20 to 40?

I don't know, but maybe you do.

$\endgroup$

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.