Dear Statalist members,
I am using Stata 14.2 on MacOS to test a mediator model where the treatment (IV) is continuous, the mediator (M) is binary and the outcome (DV) is continuous. I use the user-written command -medeff- to estimate whether the indirect effect (IV on DV via M) is statistically significant. -medeff- is part of the Mediation package from SSC and documented in the following article in the Stata Journal:
Hicks, R., & Tingley, D. (2011). Causal mediation analysis. Stata Journal, 11(4), 605-619.
However, I am not sure (and sincerely hope that I haven't missed it somewhere) whether the IV needs to be a binary variable. The -medeff- command requires users to set "levels" of the treatment variable (i.e., control and treatment condition). If nothing is specified, the command assumes that the levels of the treatment are 0 and 1. However, my treatment variable (IV) can take values from 1 to 7 and everything in between, as the variable was measured with multi-items each on a Likert scale from 1 to 7.
I have estimated three different sets of models (x1-3 are control variables):
1) Using my original treatment variable (without specifying the levels for the treatment, thus, the command assumes [0 1]
2) Using a normalized treatment variable that is in the range between 0 and 1
3) Original treatment variable, but I specified treatment levels 1 to 7 (and tried other levels as well) leading to an error message
Interestingly, the regressions in all three models (which -medeff- estimate) yield the exact same results in terms of Chi2-values (logit) and F-values (OLS) and the indirect effect (ACME) seems to be non-signifikant (CI include 0) in 1) and 2), while 3) yields only an error message.
Long story short: Can I use -medeff- for my model after all and if not, what would be alternatives (-paramed- requires also levels for the treatment and -gsem- cannot distinguish the direct/indirect effect)?
My apologies for the long text and thank you in advance for any suggestions on this matter!
Kind regards,
Florian
I am using Stata 14.2 on MacOS to test a mediator model where the treatment (IV) is continuous, the mediator (M) is binary and the outcome (DV) is continuous. I use the user-written command -medeff- to estimate whether the indirect effect (IV on DV via M) is statistically significant. -medeff- is part of the Mediation package from SSC and documented in the following article in the Stata Journal:
Hicks, R., & Tingley, D. (2011). Causal mediation analysis. Stata Journal, 11(4), 605-619.
However, I am not sure (and sincerely hope that I haven't missed it somewhere) whether the IV needs to be a binary variable. The -medeff- command requires users to set "levels" of the treatment variable (i.e., control and treatment condition). If nothing is specified, the command assumes that the levels of the treatment are 0 and 1. However, my treatment variable (IV) can take values from 1 to 7 and everything in between, as the variable was measured with multi-items each on a Likert scale from 1 to 7.
I have estimated three different sets of models (x1-3 are control variables):
1) Using my original treatment variable (without specifying the levels for the treatment, thus, the command assumes [0 1]
Code:
medeff (logit M IV x1 x2 x3) (regress DV IV M x1 x2 x3), treat(IV) mediate(M) [output omitted] ------------------------------------------------------------------------------------ Effect | Mean [95% Conf. Interval] -------------------------------+---------------------------------------------------- ACME | .0002402 -.0203698 .0240611 Direct Effect | .1552511 -.0003194 .3100036 Total Effect | .1554913 .0033906 .3079827 % of Tot Eff mediated | .0014808 .0006634 .0110117 ------------------------------------------------------------------------------------
Code:
medeff (logit M IV_normalized x1 x2 x3) (regress DV IV_normalized M x1 x2 x3), treat(IV_normalized) mediate(M) [output omitted] ------------------------------------------------------------------------------------ Effect | Mean [95% Conf. Interval] -------------------------------+---------------------------------------------------- ACME | -.0940051 -.2580492 .0304379 Direct Effect | .8625058 -.0017743 1.722242 Total Effect | .7685007 -.0944182 1.656022 % of Tot Eff mediated | -.1130681 -.9799373 .6520454 ------------------------------------------------------------------------------------
Code:
medeff (logit M IV x1 x2 x3) (regress DV IV M x1 x2 x3), treat(IV [1 7]) mediate(M) r(3000) nothing found where subexp expected
Long story short: Can I use -medeff- for my model after all and if not, what would be alternatives (-paramed- requires also levels for the treatment and -gsem- cannot distinguish the direct/indirect effect)?
My apologies for the long text and thank you in advance for any suggestions on this matter!
Kind regards,
Florian
Comment