Hello!
I am learning to use the "mediate" command with one and two mediators. There is no issue with the command when it is one mediator. However, with two mediators, the command returns an invalid model specification. Here are the data, command, and material I am using and learning from:
Data source: https://www.stata-press.com/data/r19/qoflife
Command: mediate (hrqol) (depress) (physact) (arthritis)
Documentation: STATA CAUSAL INFERENCE AND TREATMENT-EFFECTS ESTIMATION REFERENCE MANUAL RELEASE 19 ( code and data at page 393)
I use STATA SE version 19 on a MacBook Air.
Has anyone tried the command and experienced this issue?
Thanks for your help, and Happy New Year 2026!!
Kevin
I am learning to use the "mediate" command with one and two mediators. There is no issue with the command when it is one mediator. However, with two mediators, the command returns an invalid model specification. Here are the data, command, and material I am using and learning from:
Data source: https://www.stata-press.com/data/r19/qoflife
Command: mediate (hrqol) (depress) (physact) (arthritis)
Documentation: STATA CAUSAL INFERENCE AND TREATMENT-EFFECTS ESTIMATION REFERENCE MANUAL RELEASE 19 ( code and data at page 393)
I use STATA SE version 19 on a MacBook Air.
Has anyone tried the command and experienced this issue?
Thanks for your help, and Happy New Year 2026!!
Kevin

Comment