The very basic framework for mediation analysis (as I understand it) is below (DV = dependent variable, IV = independent variable):
Step 1: DV ~ IV
Step 2: Mediator ~ IV
Step 3: DV ~ IV + Mediator – check if the effect of the IV is reduced or lost after controlling for the mediator
However, if the mediator has to be log-transformed in step 2 to improve normality of residuals, should it also be log-transformed in step 3 (bolded below)? I have been told yes by one mentor, as it is a carry-through of the same analysis. If it should be, it would look like below. In my case the DV also had to be log-transformed, so I’ll include that as well.
Step 1: log(DV) ~ IV
Step 2: log(Mediator) ~ IV
Step 3: log(DV) ~ IV + log(Mediator) ?
In the example above, the DV and Mediator were log-transformed in steps 1 and 2, respectively, to ensure normality of residuals in those models.
Happy to provide specific variable names and R code, but the question is a general one and may not need it.
Mediator
in step 2 but keepingMediator
as is in step 3 -- indeed, it's easy to imagine situations where that's exactly the right thing to do. (There's no basis whatsoever, though, to suppose that taking the log of one variable forces you to take logs of all the others.) But the answers you have gotten hint that you might be conducting this analysis within some larger framework; and if so, you do need to be careful that your approach doesn't violate any of the assumptions made within that framework or create inconsistencies. $\endgroup$