Constrain the parameters by their sum/product

Great suggestions by @andrjohns and @jsocolar. Just in case it’s relevant, if you want to constrain the product of more than two positive parameters \beta to be equal to some positive value \theta, you can use a simplex parameter \kappa of length equal to the number of parameters values in \beta, and define \beta_i = \theta^{\kappa_i}. Because \Pi_i \beta_i = \Pi_i \theta^{\kappa_i} = \theta^{\Sigma_i \kappa_i} and \Sigma_i \kappa_i = 1 (because it’s a simplex), your product of parameter values in \beta are guaranteed to be \theta.

Note that this will only work for target values of the product other than 1.0.

See also Soft constraining a product of parameters (pushforward distribution) with a prior when there are also priors for individual parameters - #5 by LucC

6 Likes