0
$\begingroup$

Hi I am new to Bayesian Regression, I wanted to understand why would the Bayesian regression give exactly the same results as the priors supplied?

I tried running a bayesian model on 10% of the data without using priors, and the resulting betas I got, I used as prior for the rest of the data(20% from remaining data). However, I am getting the same betas as prior on rest of the data as well. Below is the function I am using:

bmod1 <- brm(
           Y ~ Samp + C_95 + CR_85 + LE+ SPD90 + CPA + FTO,
          data = rawdb4, family = gaussian(),
          warmup = 600, iter = 3000, chains = 4,
          control = list(adapt_delta = 0.98), cores=16, seed=150)
prior1 <- c(
prior(normal(10, 100), class = Intercept),
prior(normal(0.07, 100), class = b, coef = Samp),
prior(normal(0.2, 100), class = b, coef = C_95),
prior(normal(0.1, 100), class = b, coef = CR_85),
prior(normal(0.06, 100), class = b, coef = LE),
prior(normal(0, 100), class = b, coef = SPD90),
prior(normal(0.47, 100), class = b, coef = CPA),
prior(normal(0.55, 100), class = b, coef = FTO),
prior(cauchy(10, 10), class = sigma)
)

bmod2 <- brm(
  Y ~ Samp + C_95 + CR_85 + LE+ SPD90 + CPA + FTO,
  data = rawdb3, family = gaussian(), prior = prior1,
  warmup = 600, iter = 3000, chains = 4,
  control = list(adapt_delta = 0.95), seed=150, thin=3,
    cores = parallel::detectCores() 
)

Here rawdb3 is the latter 20% data and the prior values are based on the results from bmod1. However, the results from bmod2 are just same as bmod1.

I am really confused here, it would be very helpful if someone could help me. Thanks in advance.

$\endgroup$
8
  • $\begingroup$ Could you explain what you mean by running a Bayesian model "without using priors"? $\endgroup$ – Accidental Statistician Oct 1 '20 at 10:01
  • $\begingroup$ Hi, thanks for the comment. I meant, I have not given any prior value in the brm function. What are the implications of this? My understanding is that this would mean that the results without supplying priorss should be similar to OLS results. Please correct me if I am missing anything. Thanks :) $\endgroup$ – Shubham Malviya Oct 1 '20 at 11:09
  • $\begingroup$ The documentation for brm describes the default prior as "weakly informative", so it won't be the same as OLS but probably similar. It might be helpful to also give the code used for inference on the latter 20% of the data, since currently we can't see whether there's a problem with the way you're passing in the prior. $\endgroup$ – Accidental Statistician Oct 1 '20 at 11:16
  • $\begingroup$ Thanks for the suggestion. I have added more information to my question. Please let me know if I can provide any further clarification. Thanks $\endgroup$ – Shubham Malviya Oct 1 '20 at 12:06
  • $\begingroup$ Looks good. One last thing: if you extract the used prior from bmod2, does it match prior1 or is it something else? $\endgroup$ – Accidental Statistician Oct 2 '20 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.