Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Effect size in BANOVA (anovaBF or lmBF in R)

Is it possible to get effect size measures such as "eta squared" when running BANOVAs/LMMs in R using anovaBF() or lmBF() in R?

I've managed to do it with brm() in the brms library using eta_squared_posterior() from the effect size library.

Is there a way to get similar draws from the posterior where the model is estimated with anovaBF() or lmBF()?

Alternatively, is possible to set up a brms model that mimics the model produced by anovaBF/lmBF model?


I've only recently, shifted to Bayesian statistics, so if there are better ways to report effect sizes, e.g., reporting the posterior estimates and CIs, I would be more than happy to hear about these.


Best,

Søren

Comments

  • Hi Søren,


    This is not possible to do within JASP right now, but in R you could use the package BayesFactor and the use the posterior function to obtain samples. Afterward, you could use e.g., eta_squared_posterior to obtain an effect size measure. It would make sense to add this to JASP as well, but we simply haven't gotten to that yet.

    Alternatively, is possible to set up a brms model that mimics the model produced by anovaBF/lmBF model?

    As far as I know, it's not that easy. brms uses a model parametrization that is different from BayesFactor, so you would probably have to hand-write your own Stan model if you want to mimic the results.

    Hope this helps, let me know if you have any other questions!

    Best,

    Don

  • Hi Don,

    Thanks for your reply!

    I use R for my analyses and have been using anovaBF() and lmBF() in BayesFactor. As you suggest, I retrieved posterior samples and tried to run eta_squared_posterior() from the effectsize library. But I was not able to make it work. It seems that the function only supports models from brms and rstan (https://www.rdocumentation.org/packages/effectsize/versions/0.4.0/topics/eta_squared_posterior).

    Do you have an example where you made it work with lmBR() (or anovaBF()) and eta_squared_posterior()? Maybe I'm doing something wrong...

    Best,

    Søren

Sign In or Register to comment.