Open MichaelWeaver01 opened 2 years ago
I just encountered the same problem, with exactly the same error message as @MichaelWeaver01 encountered.
A slight twist: A brms model composed of three equations and two mediators runs into the error. A brms model composed of two equations (but still two mediators) runs fine.
If needed, I can post a reprex later.
@mattansb any thoughts on that?
I'm not familiar with the internals here - this was implemented by @strengejacke
Describe the bug When trying to run a mediation analysis having more than 1 mediation path using brms (2.16.1) and bayestestR (0.11.0), I get the following messages:
Running a simpler model, with only 1 mediator, works fine.
To Reproduce Here is the R code for that produces the brms fit object - the model compiles and runs fine:
There are 3 endogenous variables (CESD_Factor, PQSI_Global_Score_scaled, and Total_PSS_scaled) and 2 mediators (PQSI_Global_Score_scaled and Total_PSS_scaled).
I have tried several ways to write the mediation() statement, such as:
but get error messages such as:
** The simpler model (1 mediator) that runs fine:
Expected behaviour I expected that analyses of the mediation paths operating through each of the 2 mediators would be produced.
Specifiations (please complete the following information): RStudio 2021.09.0 Build 351 R version 4.1.1 (2021-08-10) -- "Kick Things" brms version 2.16.1 bayestestR version 0.11.0