Bayesian RM ANOVA w/ random slopes
I was reading the recent pre-print on including random slopes in Bayesian ANOVAs. In the paper, it notes that the specification can be done using the lmBF function from BayesFactor. I would like to implement this in my analyses but am having a bit of trouble with model comparisons and obtaining BFincl for the effects
Say we have a two-way RM ANOVA with the factors F1 & F2, would the formulae for the models (w/ random slopes) be specified as follows?
full <- DV~F1 + F2 + ID + F1*F2 + F1*ID + F2*ID
main <- DV~F1 + F2 + ID + F1*ID + F2*ID
F1 <- DV~F1 + ID + F1*ID + F2*ID
F2 <- DV~F2 + ID + F1*ID + F2*ID
Null <- DV~ID + F1*ID + F2*ID
where the R input is: mdl <- lmBF(formula, data=data, whichRandom="id").
When previously using anovaBF, the mdl output would give a summary of BFincl for the analysis of effects. However, the lmBF outputs give the BF a single model. I imagine we would need to do model comparisons to obtain the BFincl values but I am unsure of this process, or rather, how this is done in JASP.
Generally, it would be nice to have a way to reproduce the model comparison JASP output in R. I would appreciate it greatly if someone could point me in the right direction.