Hello,

I am trying to make a model that is solely reliant on the prior. I have generated a dummy dataset and set very strong priors, and I want the model to display the coefficients based solely on the prior. I tried to use sample_prior = “only” (as well as “yes” and “no”) but the results don’t seem to change. The estimates for the coefficients are on point, but the intercept is very different to what I set in my inits and prior. Does anyone have any idea as to how make intercept set?

```
category1 <- c("a", "b", "c", "d")
category2 <- c("1-15", "16-30", "31-50")
category3 <- 1:23
category1h <- as.factor(append(category1, rep("d", length(category3)-length(category1))))
category2h <- as.factor(append(category2, rep("16-30", length(category3)-length(category2))))
total_df <- data.frame(category1h, category2h, as.factor(category3))
total_df$outcome <- sample(2:6, nrow(total_df),replace = T)
colnames(total_df) <- c("category1", "category2", "category3", "outcome")
test_formula <- bf(log(outcome) ~ 1+ category1 + category2 + category3)
get_prior(test_formula, data = total_df, family = Gamma())
prior <- c( set_prior("normal(5, 0.003)", class = "Intercept")
, set_prior("normal(1,0.003)", class = "b", coef = "category1b")
, set_prior("normal(1,0.003)", class = "b", coef = "category1c")
, set_prior("normal(1,0.003)", class = "b", coef = "category1d")
, set_prior("normal(1,0.003)", class = "b", coef = "category216M30")
, set_prior("normal(1.07142857142857,0.003)", class = "b", coef = "category231M50")
, set_prior("normal(1.04464285714286,0.003)", class = "b", coef = "category310")
, set_prior("normal(1.07142857142857,0.003)", class = "b", coef = "category311")
, set_prior("normal(1.04464285714286,0.003)", class = "b", coef = "category312")
, set_prior("normal(1.05357142857143,0.003)", class = "b", coef = "category313")
, set_prior("normal(0.659640486567048,0.003)", class = "b", coef = "category314")
, set_prior("normal(0.900606790535773,0.003)", class = "b", coef = "category315")
, set_prior("normal(2.15068650185663,0.003)", class = "b", coef = "category316")
, set_prior("normal(1.43370598532241,0.003)", class = "b", coef = "category317")
, set_prior("normal(1,0.003)", class = "b", coef = "category318")
, set_prior("normal(1,0.003)", class = "b", coef = "category319")
, set_prior("normal(1,0.003)", class = "b", coef = "category32")
, set_prior("normal(1,0.003)", class = "b", coef = "category320")
, set_prior("normal(1,0.003)", class = "b", coef = "category321")
, set_prior("normal(1,0.003)", class = "b", coef = "category322")
, set_prior("normal(0.898752045460099,0.003)", class = "b", coef = "category323")
, set_prior("normal(1,0.003)", class = "b", coef = "category33")
, set_prior("normal(2.79277674437362,0.003)", class = "b", coef = "category34")
, set_prior("normal(1.54930892211565,0.003)", class = "b", coef = "category35")
, set_prior("normal(1.86317429352913,0.003)", class = "b", coef = "category36")
, set_prior("normal(2.09441409420444,0.003)", class = "b", coef = "category37")
, set_prior("normal(1.33742061732808,0.003)", class = "b", coef = "category38")
, set_prior("normal(1.42780959920377,0.003)", class = "b", coef = "category39")
)
inits <- list(
Intercept = 5,
shape = 1)
list_of_inits <- list(inits, inits)
test.model1 <- brm(
test_formula
, family = Gamma(link ="log")
, prior = prior
, data = total_df
, chains = 2
, cores = 4
, warmup = 100
, iter = 300
, inits = list_of_inits
, control = list(adapt_delta = 0.95, max_treedepth = 12)
, backend = "cmdstanr"
, threads = threading(4)
, seed = 9791
, save_pars = save_pars(all = TRUE)
#, sample_prior = "only"
)
summary(test.model1)
tab_model(test.model1)
```

my operating system is Windows 10 Pro, RStudio is 4.1.3 and brms is 2.16.3