2
$\begingroup$

I transformed one of my independent variables into natural logarithm form in a fixed effect panel data. This is because the data of this independent variable (i.e., EXT) is heavily skewed.

This is the distribution before transformation. enter image description here

And this is the distribution after log transformation enter image description here

This transformation changed the coefficients and p values of other independent variables. Thus, some of them became significant. I also notes that the constant now became insignificant. enter image description here

Can anyone please explain why this log transformation affects other variables in the model? Should I trust the result of this log transformation? Thanks in advance.

Cross-posted here: https://www.statalist.org/forums/forum/general-stata-discussion/general/1732542-log-transformed-independent-variable-affects-other-independent-variables

$\endgroup$
6
  • $\begingroup$ Welcome to Cross Validated! Could you please say why you transformed this variable? There are completely legitimate reasons to do so, and skewness might have some association with such situations, but a lack of skewness is not inherently an assumption of most models, so it isn't clear that you need to transform. $//$ It would also help if you said why you would expect the other variables to have the same coefficients. $\endgroup$
    – Dave
    Commented Nov 3, 2023 at 13:01
  • $\begingroup$ Hi, Dave. Thanks for you reply. I do this transformation because the variable has skewed data as shown in the attached picture. Is this method of log transformation appropriates in this case? $\endgroup$
    – Ahmad MHN
    Commented Nov 3, 2023 at 13:17
  • $\begingroup$ But what about the skewness makes you want to transform your variable? What makes you suspect a logarithmic relationship between this variable and the outcome? $\endgroup$
    – Dave
    Commented Nov 3, 2023 at 13:18
  • $\begingroup$ Ah, yes. I forgot to mention that the result before log transformation did not past skewness and kurtosis test, so the residuals were not normally distributed. That's why I investigated all my data and noticed that the EXT variable is skewed. Then, I proceed with this log transformation and the residual are now normally distributed. Is this appropriate? Thanks again, Dave. $\endgroup$
    – Ahmad MHN
    Commented Nov 3, 2023 at 13:37
  • $\begingroup$ Cross-posted here: statalist.org/forums/forum/general-stata-discussion/general/… $\endgroup$
    – dimitriy
    Commented Nov 3, 2023 at 13:50

1 Answer 1

1
$\begingroup$

A regression on this data determines an approximate linear relationship between BEH, HUM, PHYS, POP, RI, EXT/LEXT and some indepedent vairable Y. Ordinarily you would use that relationship to estimate Y, but you can use the same relationship to estimate EXT or LEXT from Y and all the other variables.

So you are asking about regressions similar to regressing EXT or LEXT against your other data. And those two regressions of EXT and LEXT would indeed get different results:

  • A regresssion of EXT is primarily sensitive to drivers explaining why the few values near 200000 are so much bigger than the many values below 50000.
  • A regression of LEXT is primarily sensitive to drivers explaining why the roughly half of values above 9 are bigger than the roughly half of values below 9.

We can use these to guess at an explanation for the regressions you see, assuming that your Y’s are roughly normal.

  • The regression of Y against EXT and other variables probably finds which other variables can effectively counteract the high values of EXT.
  • The regression of Y against LEXT and other variables probably finds which other variables can effectively counteract the balanced effects of LEXT.

Looked at in this way, finding different significant variables in your two regressions may not be surprising.

$\endgroup$
4
  • $\begingroup$ Hi, Matt. Thanks for your explanation. I have a follow up question. Is it okay if I assume that using LEXT is more appropriate in this case and make other parameters become efficient? I also compare the MSE of both model and it turns out that the model with LEXT has a smaller value of MSE compared to the EXT model. The residuals also normally distributed in LEXT model. $\endgroup$
    – Ahmad MHN
    Commented Nov 7, 2023 at 5:49
  • $\begingroup$ It is indeed reasonable to prefer and use the model with LEXT (vs the corresponding model with EXT) if its MSE is lower and its residuals are more normally distributed. $\endgroup$
    – Matt F.
    Commented Nov 7, 2023 at 6:33
  • $\begingroup$ Thank you, Matt. This is very helpful. $\endgroup$
    – Ahmad MHN
    Commented Nov 9, 2023 at 3:05
  • $\begingroup$ I’m glad it’s helpful — and if so you can upvote and/or accept the answer! $\endgroup$
    – Matt F.
    Commented Nov 9, 2023 at 19:44

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.