My mixed effects model is very simple, one outcome, one covariate, one random intercept. Something similar to this.
# download data directly from URL
url <- "https://raw.githubusercontent.com/hauselin/rtutorialsite/master/data/simpsonsParadox.csv"
df1 <- fread(url)
# LMER model
m_intercept <- lmer(grades ~ iq + (1 | class), data = df1)
summary(m_intercept)
My question is how do I plot this using ggplot
function geom_smooth
?
Something similar to this
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
geom_smooth(method = lm, se = FALSE)
Thanks.