# 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 or`BayesFactor::posterior()`

estimates (or whatever). I'll demonstrate below with`lm()`

because it is slightly easier.For many supported models, you can also the

`tidyverse`

approach, with the`ggeffects`

package.