How to write this prior in Stan?

I have a matrix Lambda and I want to specify its prior as log(sqrt(Lambda)) in proportion to 1.
How can I specify this prior in stan? Thanks!

Declare

matrix[?, ?] log_sqrt_Lambda;

in the parameters block and

matrix[?, ?] Lambda = square(exp(log_sqrt_Lambda));

in the transformed parameters block. Then, an improper uniform prior on the elements of log_sqrt_Lambda is proportional to 1. However, this prior seems dubious and you should verify that the posterior distribution it implies is actually proper.

1 Like

Yes, that.

@bgoodri Thank you so much!