Description Usage Arguments Details Value Author(s) Examples
Returns simulated parameters with transformations to or from the real whole number line. Parameters to transform are dependent on their specification of their prior distributions in the BUGS model.
1 |
bug |
A BUGS model created in the tsbugs package. |
sims |
A |
to.real |
Set to |
For parameters from a Gamma prior distributions in a BUGS model, a logarithmic transformation is used to convert values onto the real number line to.real=TRUE
and the exponential transformation to convert vales back to their original parameter space to.real=FALSE
For parameters from Uniform and Beta prior distributions in a BUGS model, a reverse-logistic transformation is used to convert values onto the real number line to.real=TRUE
and a logistic transformation to convert vales back to their original parameter space to.real=FALSE
.
This function was written with the intention of reducing code when in calculating the normalising constant, in particular when 1) finding the appropiate summary statistics to simulate a candidate normalised distribution from and 2) transforming simulated values to the same scales as the orginal MCMC simulations for later use.
A data.frame
with the same dimensions as the sims
argument.
Guy J. Abel
1 2 3 4 5 6 | ## Not run:
# demo example with constant variance models for differenced growth rate
# of England and Wales population as used in Abel et. al. (2013)
demo("cv_bma", "tsbridge")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.