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