Confidence intervals not extending all the way along line
adityac95 opened this issue · comments
Hi, thanks for your great package.
I built a linear mixed effects model called em_lmer_cadencesc_priors_props_int
with the following formula:
response ~ prior_dcs
+ prior_dcs:proportion_dcs
+ (1|stim_id)
+ (prior_dcs + prior_dcs:proportion_dcs||participant_private_id)
Having fit the model, I subsequently tried to plot it using sjPlot's plot_model
function as follows:
plot_model(em_lmer_cadencesc_priors_props_int,
type='pred',
terms=c('prior_dcs','cadence_sum_contrast','proportion_dcs [.2,.5,.8]'))
However, the confidence intervals are only displayed part-way along the lines:
Is there any way to get them to extend the whole way along? The maximum possible value of prior_dcs
is 20.
Hi, I'm still having this issue -- any ideas?
the range of ylim
(see ?ggplot2::ylim
) is not large enough. I suggest using ggpredict()
directly, the plot()
method is more flexible (see also https://strengejacke.github.io/ggeffects/articles/introduction_plotmethod.html#control-y-axis-appearance).
You could do
library(ggeffects)
pr <- ggpredict(
em_lmer_cadencesc_priors_props_int,
terms=c('prior_dcs','cadence_sum_contrast','proportion_dcs [.2,.5,.8]')
)
plot(pr, limits = c(0, 20))