I am running a bayesian logisitc(/Bernoulli) regression model in brms, testing the effect of a series of predictors on a log-odds of meeting a specific criteria. I used the default priors supplied by brms for the model. I need to report these priors in the paper I am writing so I looked at the stancode()
, which was as follows.
// generated with brms 2.14.4
functions {
}
data {
int<lower=1> N; // total number of observations
int Y[N]; // response variable
int<lower=1> K; // number of population-level effects
matrix[N, K] X; // population-level design matrix
int prior_only; // should the likelihood be ignored?
}
transformed data {
int Kc = K - 1;
matrix[N, Kc] Xc; // centered version of X without an intercept
vector[Kc] means_X; // column means of X before centering
for (i in 2:K) {
means_X[i - 1] = mean(X[, i]);
Xc[, i - 1] = X[, i] - means_X[i - 1];
}
}
parameters {
vector[Kc] b; // population-level effects
real Intercept; // temporary intercept for centered predictors
}
transformed parameters {
}
model {
// likelihood including all constants
if (!prior_only) {
target += bernoulli_logit_glm_lpmf(Y | Xc, Intercept, b);
}
// priors including all constants
target += student_t_lpdf(Intercept | 3, 0, 2.5);
}
generated quantities {
// actual population-level intercept
real b_Intercept = Intercept - dot_product(means_X, b);
}
Now am I right in thinking that there is a t(3,0,2.5)
prior distribution on the Intercepts but a uniform prior on the b’s? The reason I ask is that I cannot see where the prior statement is for the b’s and I know from previous posts that when the prior for a parameter is not referred to in the stancode that means it has a flat uniform prior attached to it.