Compute a draw from a univariate distribution using the code provided by Radford M. Neal. The documentation below is also reproduced from Neal (2008).
Arguments
- x0
Initial point
- g
Function returning the log of the probability density (plus constant)
- w
Size of the steps for creating interval (default 1)
- m
Limit on steps (default infinite)
- lower
Lower bound on support of the distribution (default -Inf)
- upper
Upper bound on support of the distribution (default +Inf)
- gx0
Value of g(x0), if known (default is not known)