Goal: the estimation of coefficients with a confidence interval in one command for stan_glm models.
When trying to extract coefficients CIs of my stan_glm model with fixef(), I get the error below. I try to use the fixef() from bayr instead of rstanarm, because it conveniently provides confidence intervals.
Error: Can't combine `..1$fixef` <character> and `..3$fixef` <logical>.
Here is the simplest model that I tried:
M1 <- stan_glm(variable ~ 1, data = data)
fixef(M1)
I first thought it might be a conflict in libraries, so I tried activating libraries who use fixef (rstanarm, bayr) in a different order, but that didn't help. At the moment I use the following libraries (in that order):
janitor, haven, data.table, modeest, dplyr, tidyverse, readxl, gridExtra, rstanarm, devtools, mascutils, bayr
Any suggestions on what could be the source of that error?
edit:
rstanarm::fixef(M1)
works, but gives the coefficient without confidence intervals. the bayr::fixef() would give them automatically.
I tried also tried the following:
coef(M1)
"Error: Can't combine `..1$fixef` <character> and `..3$fixef` <logical>."
posterior_interval(M01) #gives only confidence interval without the coefficient estimate