Plotting different models
Hello!
I'm wondering how I could reproduce the two-panels figure comparing a model with interaction and a model without interaction on the Bayes Factor page:
https://richarddmorey.github.io/BayesFactor/#glm
Anyone knows the r code for plotting this?
Thank you in advance!
Comments
The basic steps are:
abline()to plot the linesYou can do this with either
lm()estimates orBayesFactor::posterior()estimates (or whatever). I'll demonstrate below withlm()because it is slightly easier.For many supported models, you can also the
tidyverseapproach, with theggeffectspackage.