QLIM Procedure

Hamiltonian MC: Parameter Transformation

The QLIM procedure implements the Hamiltonian Monte Carlo No-U-Turn Sampler (NUTS) with transformation of the bounded parameters. For more information about NUTS and more in general about Hamiltonian Monte Carlo, see the section Hamiltonian Monte Carlo Sampler (SAS/STAT User's Guide).

The Bayesian analysis is primarily interested in the properties of the posterior distribution,

p left-parenthesis theta vertical-bar bold y right-parenthesis comma

where theta equals left-parenthesis theta 1 comma ellipsis comma theta Subscript k Baseline right-parenthesis prime is the parameter vector associated with the model and bold y represents the data. The properties of the model and the properties of the prior distribution can impose restrictions on the domain of theta. These restrictions can reduce the efficiency of the common sampling methods. One way to improve the efficiency is to perform a parameter transformation, which maps the bounded parameters theta to the unbounded parameter bold u. In a simplified scenario, four cases can be identified:

u Subscript i Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column theta Subscript i Baseline 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than normal infinity 2nd Row 1st Column ln left-parenthesis theta Subscript i Baseline minus min right-parenthesis 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than normal infinity 3rd Row 1st Column ln left-parenthesis max minus theta Subscript i Baseline right-parenthesis 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity 4th Row 1st Column ln left-parenthesis theta Subscript i Baseline minus min right-parenthesis minus ln left-parenthesis max minus theta Subscript i Baseline right-parenthesis 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity EndLayout

The corresponding inverse transformations are

theta Subscript i Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column u Subscript i Baseline 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than normal infinity 2nd Row 1st Column min plus e Superscript u Super Subscript i Baseline 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than normal infinity 3rd Row 1st Column max minus e Superscript u Super Subscript i Baseline 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity 4th Row 1st Column StartFraction max e Superscript u Super Subscript i Superscript Baseline plus min Over e Superscript u Super Subscript i Superscript Baseline plus 1 EndFraction 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity EndLayout

with partial derivatives

StartFraction delta theta Subscript i Baseline Over delta u Subscript i Baseline EndFraction equals StartLayout Enlarged left-brace 1st Row 1st Column 1 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than normal infinity 2nd Row 1st Column e Superscript u Super Subscript i Baseline 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than normal infinity 3rd Row 1st Column minus e Superscript u Super Subscript i Baseline 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity 4th Row 1st Column StartFraction left-parenthesis max minus min right-parenthesis e Superscript u Super Subscript i Superscript Baseline Over left-parenthesis e Superscript u Super Subscript i Superscript Baseline plus 1 right-parenthesis squared EndFraction 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity EndLayout

Given the independent nature of the transformation, the corresponding Jacobian is a diagonal matrix

upper D Subscript u Baseline equals Start 3 By 3 Matrix 1st Row 1st Column StartFraction delta theta 1 Over delta u 1 EndFraction 2nd Column Blank 3rd Column Blank 2nd Row 1st Column Blank 2nd Column down-right-diagonal-ellipsis 3rd Column Blank 3rd Row 1st Column Blank 2nd Column Blank 3rd Column StartFraction delta theta Subscript k Baseline Over delta u Subscript k Baseline EndFraction EndMatrix

which in turn implies that

p left-parenthesis bold u vertical-bar bold y right-parenthesis equals p left-parenthesis theta vertical-bar bold y right-parenthesis StartAbsoluteValue Det left-parenthesis upper D Subscript u Baseline right-parenthesis EndAbsoluteValue equals p left-parenthesis theta vertical-bar bold y right-parenthesis product Underscript i equals 1 Overscript k Endscripts StartAbsoluteValue StartFraction delta theta Subscript i Baseline Over delta u Subscript i Baseline EndFraction EndAbsoluteValue

It is usually convenient to work on the logarithmic scale,

StartLayout 1st Row 1st Column ln left-bracket p left-parenthesis bold u vertical-bar bold y right-parenthesis right-bracket 2nd Column equals 3rd Column ln left-bracket p left-parenthesis theta vertical-bar bold y right-parenthesis right-bracket plus sigma-summation Underscript i equals 1 Overscript k Endscripts ln left-parenthesis StartAbsoluteValue StartFraction delta theta Subscript i Baseline Over delta u Subscript i Baseline EndFraction EndAbsoluteValue right-parenthesis 2nd Row 1st Column StartFraction delta ln left-bracket p left-parenthesis u Subscript i Baseline vertical-bar bold y right-parenthesis right-bracket Over delta u Subscript i Baseline EndFraction 2nd Column equals 3rd Column StartFraction delta ln left-brace p left-bracket theta Subscript i Baseline left-parenthesis u Subscript i Baseline right-parenthesis vertical-bar bold y right-bracket right-brace Over delta u Subscript i Baseline EndFraction plus StartFraction delta ln left-parenthesis StartAbsoluteValue delta theta Subscript i Baseline slash delta u Subscript i Baseline EndAbsoluteValue right-parenthesis Over delta u Subscript i Baseline EndFraction identical-to StartFraction delta ln left-brace p left-parenthesis theta Subscript i Baseline vertical-bar bold y right-parenthesis right-brace Over delta theta Subscript i Baseline EndFraction StartFraction delta theta Subscript i Baseline Over delta u Subscript i Baseline EndFraction plus StartFraction delta ln left-parenthesis StartAbsoluteValue delta theta Subscript i Baseline slash delta u Subscript i Baseline EndAbsoluteValue right-parenthesis Over delta u Subscript i Baseline EndFraction EndLayout

where

StartFraction delta ln left-parenthesis StartAbsoluteValue delta theta Subscript i Baseline slash delta u Subscript i Baseline EndAbsoluteValue right-parenthesis Over delta u Subscript i Baseline EndFraction equals StartLayout Enlarged left-brace 1st Row 1st Column 0 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than normal infinity 2nd Row 1st Column 1 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than normal infinity 3rd Row 1st Column 1 2nd Column if negative normal infinity less-than theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity 4th Row 1st Column 1 minus StartFraction 2 e Superscript u Super Subscript i Superscript Baseline Over e Superscript u Super Subscript i Superscript Baseline plus 1 EndFraction 2nd Column if negative normal infinity less-than min less-than-or-equal-to theta Subscript i Baseline less-than-or-equal-to max less-than normal infinity EndLayout
Last updated: June 19, 2025