I want to plot my model regressions with confidence intervals. I have used ggplot but it only shows the confidence intervals for one of my two categories. Could it be that the range of standard error for one category is too small relative to the other and that's why ggplot only displays confidence intervals for one?
When I plot the two categories separately then I get confidence intervals but when I merge them into one plot in ggplot then only one of them is displayed with confidence intervals.
I want to plot the linear regression of the how food consumption rate changes with increasing temperature (temp) and compare this between two day types .
This is my model:
m1 <- glmmPQL(totbeakfuls ~ scale(temp)*day.type + offset(log(duration/60)),
random = ~1|birdid,
family = quasipoisson(link="log"),
data = focaldata)
Then I use ggeffects to produce predictions of my model, taking to account that it is an interaction model between day type and temperature.
dat<- ggeffects::ggpredict(m1, terms = c("temp", "day.type"), type = "re")
then I use ggplot to those predictions
ggplot(data = focaldata, aes(x = temp, y = consumption)) +
geom_point(aes(color = day.type)) +
geom_smooth(data= dat, method = "lm",
aes(x = x, y= predicted, fill= group, color=day.type),
se = TRUE)
Even through I specify "se = TRUE" It only plots the confidence intervals for one of the day type categories.