Or is the non-centered parametrization done automatically now?
Bob also writes “In 2.20, which will be out soon, we’ll also have the multivariate version where the offset is a vector and the multiplier a Cholesky factor.” Is there an example somewhere?
And I guess that the non-centered parametrization of the user guide is a bit outdated now, right?
My reading is that the non centered parameterisation is now the default and the one with the offset bit in it is how you do a centered parameterisation if you want to.
parameters {
vector[K] alpha;
real mu;
real<lower = 0> sigma;
}
model {
alpha ~ normal(mu, sigma);
}
is just the standard, centered parameterization (not non-centered). The new addition is the offset multiplier syntax, which essentially removes some code duplication. The old, still more common way to write this would be
parameters {
vector[N] alpha_std;
real mu;
real<lower=0> sigma;
}
transformed parameters {
vector[N] alpha = mu + alpha_std * sigma;
}
model {
alpha_std ~ normal(0, 1);
}
Note that in the first code snippet, the model is parameterized in terms of alpha, which is distributed as normal(mu, sigma), whereas in the second code snippet the model is parameterized in terms of alpha_std, which is then scaled and shifted with an offset and multiplier. This has the advantage that it is easier to sample from.
You may also find the original issue on github useful, which has a much better explanation than mine: