brms package is an R package for fitting Bayesian models using
lme4-like syntax using Stan as the back-end. In the package, there is an option to fit a model without specifying any priors. In this case, according to the documentation, the package by default selects noninformative or weakly informative priors. In particular, according to a vignette, for population-level parameters the default is improper, and for group-level parameters the default for the SD is a Student's t.
As I fit a model using the default priors (having no prior information to speak of), I would like to see what the priors used actually were. The function
prior_summary prints out the priors used after fitting the model.
However, I'm having trouble understanding the printout. Here it is, and the model is
distance | cens(censored) ~ (segdist + tonedist | participant) + (1|variable):
prior class coef group resp dpar nlpar bound 1 student_t(3, 4, 10) Intercept 2 lkj_corr_cholesky(1) L 3 L participant 4 student_t(3, 0, 10) sd 5 sd participant 6 sd Intercept participant 7 sd segdist participant 8 sd tonedist participant 9 sd variable 10 sd Intercept variable 11 student_t(3, 0, 10) sigma
As you can see, there many lines without any prior specified. I have thought of two reasons for this:
Possibility 1: Those blank lines were fit with improper priors. One reason for thinking this is that there is an
all parameter in the function, which the documentation describes as follows: 'Logical; Show all parameters in the model which may have priors (TRUE) or only those with proper priors (FALSE)?'. After setting it to FALSE, all lines but 1, 2, 4 and 11 were removed, seemingly implying that they have improper priors.
However, this seems strange as the SDs had an improper prior, which they're not supposed to. Moreover, I'm not sure what lines like 3, 4, 5 and 9 actually are. 4 in particular cannot refer to the model's residual standard deviation since that's
sigma, so it's not clear what a population-level sd is doing here.
Possibility 2: Lines 2 and 4 are headers, and imply that all the following lines have that prior. This seems to make sense in the case of line 2. Assuming that L in the
class column is a stand-in for
cor (correlations; I couldn't find an
L class anywhere in the documentation), the prior makes sense. (I only have correlations in the
participant groupings since for
variable, there is just a random intercept.) Similarly, all the group-level effects have Student's t priors, which is expected behaviour.
This is what I feel is the more sensible guess. It doesn't explain the strange behaviour of
all, though, since lines 3 and 5-10 would have proper priors, and should show up even when
all=FALSE according to the documentation. Moreover, lines 5 and 9 are still slightly mysterious, although I could explain them away as 'sub-titles' which 'inherit' the prior from line 4 and 'pass them on' to the intercepts and slopes.
Are any of my guesses correct?
P.S. The doc for
prior_summary is p.133 of this.