to define a uniform prior on the hypersphere. However, I found it may lead to a large bias to the estimation of \beta. An alternative is discussed by [1812.05741] Constrained inference through posterior projections where they discuss the posterior projection and we may code like

Can you clarify what you mean by bias? Can you also clarify why you choose to put a standard normal prior on beta (assuming this is what you mean by N(0,1))? This will interact with the unit_vector constraint in weird ways.

Is it perhaps the case that there’s some confusion arising from the Stan Users Guide page on Unit Vectors, where it mentions that each of the unconstrained variables that underlies Stan’s unit_vector implementation is given a standard normal adjustment. This is handled automatically and under-the-hood on the unconstrained scale in Stan, and does not need to be done by the user in the model block.

Thank you. The bias means that if I have a true value of \beta_0, the bias between it and the posterior mean.

As the User Guide mentions, Stan realize the unit vector by reparameterization and the prior N(0, 1) leads to a uniform prior on the hypersphere. I also tried other noninformative prior such as N(0, 10000) but it does not change the result much.

This must occur in the context of some particular model and data. Can you provide a reproducible example of this bias occurring?

This is handled automatically and under-the-hood in Stan. If you want your prior to be uniform over the hypersphere, then don’t add any prior statements. When you declare a unit_vector, Stan automatically gives it a uniform prior over the hypersphere.