Hi All,
Suppose I want to further condition a posterior distribution p(\theta | X) on a function or predicate of the parameter. For example, suppose parameter \theta \in \mathbb{R}^2 and I want to sample from
p(\theta | X, \theta_1 < \theta_2)
my question: If \theta has some marginal/prior distribution such that I can’t write down the distribution p(\theta | \theta_1 < \theta_2), would that indicate that I couldn’t sample from such a distribution in Stan?
That is, do I need to be able to write down some sampling expression for \theta using ~ and a normalized distribution for \theta in the model block? Or would there be an alternate solution, perhaps by explicitly modifying the expression proportional to the log-posterior density with an indicator of this \theta_1 < \theta_2 predicate?
I’m curious if it’s possible to express this in Stan, even though I understand it would in general be hard to sample from.
Apologies if this is a duplicate! I saw some discussion with constraints in transformed parameters, but that seems different from what I’m asking.
very best,
mark