That was in the context of QR decomposition, so I’m not exactly sure how you are using it without using the QR decomposition.
I’m not sure I totally follow what is going on here, It sounds like you are actually exploring different models, rather than different parameterizations of the same model, and so this would be why you are getting different results, rather than landing on different posterior modes of the same model.
I’m essentially using the parameterization written by Bob in this post:
Which directly followed the one you’re referring to. I somehow missed this post:
Where you do cite a paper for the method (so I could have answered my first question on my own, I guess…)
Anyway, yes, I realize that your QR parameterization and Bob’s parameterization are both different models when compared to the model originally written in the manual, which suggested placing the prior only on beta_raw.
I’m sorry I haven’t been clear; I didn’t mean to hijack this thread.
Could someone please explain or provide an accessible reference as to why inv_sqrt(1 - inv(N)) is ‘right’ scale value to use in this situation on the free parameters to give a marginal standard normal distribution on the quantities of interest?
For the problem at hand, using Fraser’s notation, we have n-dimensional normal (x_1, \ldots, x_n) with k constraints, expressed as:
\sum_{j=1}^n a_{p,j}x_j =0, (p = n - k +1, \ldots, n)
In our case k = 1 and a_{n,1} = a_{n, 2} = \ldots = a_{n,n} = 1
Then you can follow Fraser’s method to find an n-1 dimensional covariance matrix T = ||\tau_{r,s}||, (r,s = 1, \ldots {n - 1}) and orthogonal matrix B = ||b_{i,j}||, (i,j = 1, \ldots, n).
Then if y_1, \ldots, y_{n - 1} \sim MVN(0, T) we have x_i = \sum_{r = 1}^{n - 1} b_{r,i} y_r satisfying the constraint and with the correct marginal distribution.
I didn’t do the math to double check, but it appears that the code a) uses a QR decomposition of B to get a more efficient computation for the transformation from y to x and b) that T is a diagonal matrix, with \tau_{i,i} = \frac{1}{\sqrt{1 - \frac{1}{n}}} for all i.