I am new to brms and have been getting a warning message when I specify priors.
The model is a re-analysis of a randomised trial published in New England J Medicine. It is a simple logistic regression model (dead ~ treat) comparing ECMO (a form of artificial lung support for patients with pneumonia) vs control on mortality outcome in patients in ICU. Based on neutral beta priors (converted to normal priors) I specified the priors as:
prior_neutral <- c(
set_prior("normal(0, 0.33132171)",class = "b", coef = ""),
set_prior("normal(0, 0.33132171)", class = "b", coef = "treatECMO"),
set_prior("student_t(3, 0, 2.5)",class = "Intercept", coef = "") # use default for this prior
)
The model is:
bernoulli(link = "logit"),
data = EOLIA,
prior = prior_neutral,
chains = 2, # nb of chains
iter = 5000, # nb of iterations, including burnin
warmup = 1000, # burnin
thin = 1)
When I run the model, I get the following warning:
Warning message:
The global prior ânormal(0, 0.33132171)â of class âbâ will not be used in the model as all related coefficients have individual priors already. If you did not set those priors yourself, then maybe brms has assigned default priors. See ?set_prior and ?get_prior for more details.
However, when I run the following code:
I get:
prior_summary(EOLIA_neutral)
prior class coef group resp dpar nlpar lb ub source
normal(0, 0.33132171) b user
normal(0, 0.33132171) b treatECMO user
student_t(3, 0, 2.5) Intercept user
This seems to imply the model is using my defined priors.
So, (finally) my question is: what does the warning message mean and are my priors being used by the model (which seems to be the case.
Any advice gratefully received.
Many thanks,
David