Positive-parameter random walk with boundary rejection (source code)

= Positive-parameter random walk with boundary rejection
{title2=$v'=v+\eta,\quad\eta\sim N(0,s^2)$}

To update a positive parameter, a symmetric additive <proposal distribution> can be generated on the whole real line. Reject nonpositive proposals; accept positive ones using the target density ratio. The off-diagonal proposal remains symmetric. Repeatedly redrawing until the proposal is positive instead truncates and renormalizes the proposal differently at different current states, so a Hastings correction is then required. A symmetric walk in $\log v$ is another valid method, but its transformed target includes the <Jacobian determinant> factor $v$.