Modeling a Spectrum of Gaussians with SMC

In most cases, they’re quantities that people are familiar with such as positive-constrained values, probabilities, or covariance matrices, where standard distributions can be used or users can make their own up. We have a whole Wiki full of prior advice, as well as a lot of advice in our User’s Guide.

After the Jacobian correction, Stan assigns all parameters a (potentially improper) uniform prior distribution. Any prior on top of this is just added in on the log scale. This is how all of Stan works—the declared variables get uniform support and if you want a different prior, you add its log density to the target density.

For ordered vectors like this, we’re often using them for cutpoints in an ordinal regression. In that case, we usually don’t want them to collapse to the same values, so we’d use something like a zero-avoiding positive-constrained prior on the differences. Something like

vector<lower=0>[N] y;
...
y[2:] - y[1:N-1] ~ lognormal(0, 1);

That’s still only putting a prior on N - 1 degrees of freedom, so it’s still not proper. For that, you’d want to add a distribution on one of the y values, such as

y[1] ~ ...;
1 Like