-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Awesome package. I switched to using fmcmc
and love it! Really streamlined interface, burgeoning functionality, stellar performance.
There's one feature I miss from adaptMCMC
and that is the ability to return multiple things from the logdensity function. Here's a quote describing the function argument in adaptMCMC::MCMC()
function that returns a value proportional to the log probability density to sample from. Alternatively it can be a function that returns a list with at least one element named
log.density
.
In some cases the functionp
may not only calculate the log density but return a list containing also other values. For example, ifp
is a log posterior one may be also interested to store the corresponding prior and likelihood values. The function must either return always a scalar or always a list, however,the length of the list may vary.
I understand that parsing the returned list will cost performance, but it could enable more interesting output from MCMC and, in particular, allow users to transform parameters (similar to transformed parameters
block in STAN).