Is it possible to calculate cohen's d from brms?

Cohen’s D is very possible in Bayesian frameworks. In fact, in Kruschke’s influential 2013 paper on Bayesian t-tests (Bayesian estimation supersedes the t test - PubMed), one of the advantages of Bayesian computations of effect sizes is that we obtain the posterior distribution of the effect size, rather than a point estimate. While standard confidence intervals can be computed for the typical point-estimated Cohen’s D, access to the full posterior allows much more interesting inference (e.g., probability that the effect size is within certain effect ranges like “small” or “large”). There is a separate package in R for fitting the Bayesian t-test (https://cran.r-project.org/web/packages/BEST/vignettes/BEST.pdf), and there is a helpful blog post from Matti Vuorre on how to do this in brms (Sometimes I R: How to Compare Two Groups with Robust Bayesian Estimation in R).

Ultimately, you are not doing a typical t-test as you have other variables of interest in the model. This resource describes computing Cohen’s D in brms from a model kind of similar to what you have: A An introduction to Bayesian multilevel models using brms | Understanding rumination as a form of inner speech. There is also a convenience function in the report package from the easystats group that converts rstanarm models to effect sizes: Report the effect size(s) of a model or a test — report_effectsize • report. You might check out the source code (report/report_effectsize.R at master · easystats/report · GitHub) to see how they get the estimate, or you may even just consider estimating the model in rstanarm (should get very similar results, and might even be able to pass the same inits from the brms fit to the rstanarm fit) just so that you can get the estimates for your advisor (because at the end of the day, clean code is great but a defended thesis is best). Your model seems pretty simple, so I’d suspect that running it again in rstanarm is a trivial investment in time if you just want to get an estimate and move on with your life.

Edit to include a last minute thought:
You can also just consider standardizing your model and getting the standardized regression coefficients. Those should be reasonably understandable effect sizes in their own right and don’t require any fooling around with the posteriors. You can either standardize your variables prior to fitting the model (recoding Introduction to Mediation, Moderation, and Conditional Process Analysis) or you can utilize the convenience function standardize_parameters() from the effectsize package (also from the easystats group). You can read more about the latter option here: Parameters standardization — standardize_parameters • effectsize

5 Likes