I am using sjPlot::plot_model
to plot a lmer
model. What are the default error bars?
Here is my model:
p <- lmer(dv~iv1+ factor(iv2)+ (1+iv1+factor(iv2)|subject))
Here is the plot model with no specification to the error intervals:
p <- plot_model(p3, type="pred", terms=c("iv1", "iv2"), title="Predicted Values")
Here is the plot model specifying 95% CI:
p <- plot_model(p3, type="pred", terms=c("iv1", "iv2"), ci.lvl=0.95, title="Predicted Values")
In the end, the graphs look very similar. I just want to confirm what the default (1) error intervals are representing because I forgot to initially specify and if they are 95% CI then I won't have to remake all of the graphs I created for several analyses that I've already conducted. Thank you for your help!
It is always good to check the help file. As you write in the comments @saraconnor, "By default, stanreg-models are printed with two intervals: the "inner" interval, which defaults to the 50%-CI; and the "outer" interval, which defaults to the 89%-CI. ci.lvl affects only the outer interval in such cases"
Yes, the default confidence interval for this function is 89%. Many plots can include inner and outer CI bands, the help file is saying that the outer-most band defaults to ci.lvl=0.89
, which you will have to manually specify as ci.lvl=0.95
or prob.outer=0.95
, like you have. The inner band is specified with prob.inner
(which defaults to 0.50 as the helpfile text you've supplied suggests). Either of these numbers can be set between 0 and 1.
See McElreath, R. (2020). Statistical rethinking: A Bayesian course with examples in R and Stan. CRC press. for one explanation as to why 89% CI - spoiler, because it is prime! (just a note on the arbitrariness of 95, or any other value).