Box Constraints¶
This section provides implementation details for how MCMCLib handles box constraints.
For a parameter \(\theta_j\) defined on a bounded interval \([a_j,b_j]\), where \(a_j < b_j\), we use the generalized logit transform:
with corresponding inverse transform
Note that the support of \(\phi_j\) is \(\mathbb{R}\).
The log posterior kernel function of the \(J \times 1\) vector \(\boldsymbol{\theta}\) is given by:
where \(L\) is the likelihood function of the data \(Y\) parametrized by \(\boldsymbol{\theta}\), and \(\pi\) is the joint prior distribution over \(\boldsymbol{\theta}\). The log posterior kernel function of the transformed parameter vector \(\boldsymbol{\phi} = g(\boldsymbol{\theta})\) is then computed as
where \(|J|\) is the modulus of the Jacobian determinant matrix \(J\)—that is, the determinant of a matrix with \((i,j)\) elements equal to
If the parameters \(\boldsymbol{\theta}\) are assumed to be a-priori independent, then
Given our specification for \(g\), the Jacobian term will be a diagonal matrix with non-negative elements: the log Jacobian adjustment for parameter \(j\) is given by
As the determinant of a diagonal matrix is the product of its diagonal elements, the final term in can be computed as a sum: