"Default" priors on constrained variable types

Hello,

I had a question regarding default priors for covariance matrices. If I do not specify a prior in the model block, which prior does stan default to? Is there a section in the manual that provides default priors for different parameter types (covariance, positive bounded, bounded between 0 and 1, etc.)?

``````data{
array[N][K] y;
}

parameters {
vector[K] mu;
cov_matrix[K] Sigma;
}

model {
for(n in 1:N){
target += multi_norm_lpdf(y[n] | mu, Sigma);
}
}
``````

Stanâ€™s built-in constrained types implicitly include a Jacobian adjustment that ensures that, absent any additional increments to the target, the target will be flat over the constrained variables. So in this case, the â€śdefault priorâ€ť as you call it will be the improper flat prior over covariance matrices such that any two valid covariances matrices are equally likely (all the way out to infinite variances, or at least out to the limits of whatâ€™s representable numerically via double precision floating point).

An alternative paramterization is to construct a covariance matrix from a correlation matrix and a vector of scales (marginal standard deviations). In this case, the default prior on the correlation matrix will be the LKJ(1) prior, i.e. flat over all correlation matrices, which is a proper prior. The default prior on the vector of scales (assuming that they are declared with a lower-bound constraint at zero and no further constraint) will be the improper flat prior over the nonnegative part of \mathbb{R}^N. Thus, in this construction the induced prior on the covariance matrix will be flat over the marginal standard deviations, rather than over the marginal variances.

Personally, I find it hard to reason about the part of the prior that involves a matrix, and relatively easy to reason about the part of the prior that involves a vector of scales. Therefore, I prefer to parameterize using the correlation matrix. This allows me to address the conceptually difficult matrix stuff with LKJ priors, which are always proper and donâ€™t make my brain hurt so much. And then I can figure out how to put a prior on the scales, which to me is more intuitive than trying to put a prior on the variances, primarily because Iâ€™m used to parameterizing normal distributions by the standard deviations in Stan, but also because standard deviations have the same units as the measurement itself and so feel more natural for thinking about variability.

3 Likes