Another covariance matrix marginalisation question from me, I’m afraid. I have n covariance matrices which have been converted to correlation matrices, inputted as data. I want to marginalise over them to get means (assuming each correlation matrix has an implicit uniform prior). In the centered parameterisation, this is easy, and various people on this board have been very helpful in showing me how to do it. The prior for the means, is (with “mean” and “scale” being parameters):
lp = rep_vector(log_unif, n);
for (i in 1:n) {
lp[i] += multi_normal_cholesky_lpdf(mean | 0, diag_pre_multiply(scale, cholesky_of_correlation_matrix[i]));
}
target += log_sum_exp(lp);
###prior on scale###
I can’t work out how to convert this to the non-centred version though. If you were not marginalising (i.e. you had a single known correlation matrix), for a 0 mean MVN it would be:
mean = scale * (cholesky_of_correlation_matrix * mean_tilde);
mean_tilde ~ normal(0,1);
###prior on scale###
The logical way to marginalise would be to do the above for each matrix, but that ends up with n sets of means, which is clearly not what’s required. If anyone could point me in the direction of something explaining how to do this, I would greatly appreciate it!