0
$\begingroup$

I am estimating several linear models using a difference-in-differences (DiD) framework. The model interacts a treatment indicator (i.e., 1 for the treatment group, 0 for the control group) and a "time" indicator indexing the post-treatment period in both experimental groups following implementation of a government program. All outcomes are 'relatively' right skewed crime rates.

First, I ran all models with outcomes in their "level" form. I then re-estimated the same models but with outcomes in logarithmic form (i.e., log-linear regression). Some, though not all, of my interaction effects switch sign after transforming my outcome. It should be noted that the coefficients on the interaction terms are not statistically significant.

Is it possible to observe a flip in sign on the interaction term after logging a dependent variable? I don't believe I have any multicollinearity concerns.

Any thoughts?

$\endgroup$
  • $\begingroup$ Welcome to CV! Can you include a MWE, so others can reproduce this phenomenon? $\endgroup$ – Frans Rodenburg May 9 at 7:47
1
$\begingroup$

What kinds of values do you have for crime rates? I assume they are # of crimes per 1,000 pop. or something similar? If the values are less than 1, then log-transforming them will simply make them all negative, which can flip the sign of correlation with a binary variable (i.e., the difference in means between the two groups can go from positive to negative).


Also, since you have outliers in your data (resulting in a skewed distribution), performing a log transformation on that kind of variable can also change the sign of correlation with other variables. There is another CV Q&A that shows how it can work with continuous $X$'s: Interpretation of β in case of log-lin model for relationship between X and Y. But the idea is the same with a binary dummy like in the case of your interaction term. Outlier crime rates can push the average in one group really high, making the mean larger in that group relative to the other. But log-transforming those outliers will reduce their magnitude by more than other values, which can make the mean of the first group smaller than that of the other.


Finally, since you have a multiple regression and we are talking about a variable whose value is dependent on other variables, by log-transforming the dependent variable you are transforming the relationships among all the variables in your model. You may be aware that coefficients in a log-linear regression take on a different interpretation than in a linear relationship. For example, for the difference in differences coefficient (the interaction term, let's call it $\beta_{4}$), the interpretation changes (per Interpretation of log-level difference-in-differences specification) from:

If $Treat\times Post$ switches from 0 to 1, the impact on $Y$ is $\beta_{4}$

to

If $Treat\times Post$ switches from 0 to 1, the % impact on $Y$ is $100 \cdot (\exp(\beta_4)-1)$.

So the main impact of your transformation may be reflected in changes to coefficients on the treatment indicator and the pre/post indicator, per the previous paragraph. Those changes can then be reflected in a change to the interaction term.

$\endgroup$
  • $\begingroup$ The outcome is the crime rate per 100,000 population. The geographic units I am working with are rather large, so the population size per jurisdiction is large as well. In some months the ratio is small, and so the skewness is pronounced. Should I set all crime rates 'less than one' equal to 'unity' before taking the log? $\endgroup$ – Tom May 9 at 18:34
  • $\begingroup$ The "less than one" issue should not be problematic if those cases are limited and the overall means of the groups remain positive after the transformation. I certainly don't recommend modifying data yourself. You should not expect for results to be similar with different functional forms of DV, so I would first think whether there is a theoretical justification for transforming: does it properly capture the relationship between the DV and other covariates you have in the model. For more info: docplayer.net/… $\endgroup$ – AlexK May 9 at 21:30

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.