0
$\begingroup$

Estimating the following model in Stata helped me get the direct effects. This is a set of three models, a beta regression with the final outcome as the dependent variable, and two mediating negative binomial regressions. I've not been able to write the same model using lavaan or mediation packages in R, because lavaan assumes normality of residuals, and I could not figure out how to define more than one discrete mediator using the mediation package in R.

gsem (c.practice_days c.practice_count c.gpa c.gpa#c.practice_days c.gpa#c.practice_count -> final_0_1, family(beta) link(logit)) (1.counting_days 1.counting_days#c.gpa -> practice_days, nbreg) (1.counting_days 1.counting_days#c.gpa practice_days -> practice_count, nbreg), nocapslatent

However, I'm stuck with calculating the mediation indirect effects, because gsem does not support estat teffects. I searched a lot, and finally came across this blog post, but I got frustrated after reading the second paragraph:

Note that this is a case where all variables are continuous and all models are linear - we are only using gsem for its support of svy:, not its support of GLMs. Indirect effects are a more complicated topic in those models which we do not address here.

The Stats documentation also explains only basic models with normality assumptions and uses nlcom to calculate the indirect effects.

Please advise on how to calculate the mediation indirect effects of this model.

$\endgroup$

1 Answer 1

0
$\begingroup$

The following article may be helpful for you.

Direct and indirect effects in a logit model. The Stata Journal Volume 10 Number 1: pp. 11-29

Maarten L. Buis Department of Sociology Tübingen University Tübingen, Germany [email protected]

https://www.stata-journal.com/article.html?article=st0182

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.