jamovi-amm / jamm

jamovi Advanced Mediation Models
Apache License 2.0
9 stars 5 forks source link

About the jAMM module GLM Mediation Analysis #18

Closed kevinchan0903 closed 10 months ago

kevinchan0903 commented 1 year ago

I would like to examine a mediating effect with a control variable, which is expected to predict DV but not the mediator.

Let's say we have four variables, IV1, IV2, Med, and DV. In the GLM mediation model under jAMM module Put DV into dependent varibale Put Med into Mediators Put IV1 and IV2 into Covariates In the Mediators models: Put IV1 under Mediator = Med In Full model Confirm Med, IV1, and IV2 are in the Model Terms

The results of the GLM should be displayed and selected. Now, in the Results interface, click something and click the results of the GLM again. Check the Full model: IV2 will not be included in the Model Terms

Has someone also got this problem? Or am I making some mistakes in the model?

Thanks a lot!!

mcfanda commented 1 year ago

Yes, you are correct. This is due to the fact that when you change something in the input panel, the interface resets the models to the "correct" mediation model. If you really want to estimate a mediation model in which IV2 is not predicting the mediator, you simply remove IV2 from the Mediators models after changing the input. I see that this can be annoying, but it is easily solvable by the user. Nonetheless, we can fix this in future versions.

On the other hand, I do not really see many reason to estimate a model in which the control variable is not predicting the mediator. In such a model, in fact, one is not estimating the mediated effect keeping constant IV2. The resulting mediated effect (a*b) will be a hybrid effect, half (a) not keeping constant IV2, half (b) keeping it constant. If IV2 is expected not to predict the mediator, you should put it in the model anyway and observe that its effect on the mediator is null (or very small). In the model you described, the effect between IV2 and Med is forced to be zero. If it is not zero in the data, your results will be biased. On the contrary, if you estimate the path IV2 to Med, whatever are the results, they will be correct.

Anyway, we'll fix this resetting issue.

kevinchan0903 commented 1 year ago

@mcfanda Thank you for your response and suggestions. It is really helpful for me, and I believe that it would be helpful to explain the results. Thank you very much!!