priPost {rube} | R Documentation |
Show MCMC prior and posterior on the same plot.
priPost(post, dist = c("Normal", "Uniform", "Gamma", "Beta", "sdFromGammaPrecision", "HyperBeta", "HyperGamma"), pripar, main = NULL, xlab = NULL, xlim = NULL, nsim = 2000, digits = 1, true = NULL, hgtrim=0.99)
post |
A vector, usually from an element of the sims.list element of a bugs() object, that contains the posterior simulated values for one parameter. |
dist |
The specified distribution of the parameter. |
pripar |
The parameters of the prior distribution (numeric vector). |
main |
The plot title. |
xlab |
The plot x-label (defaults to the parameter name as best determined). |
xlim |
x-axis limits. |
nsim |
Number of simulations of the prior used to evaluate its shape when a compound prior is used. |
digits |
Number of digits to round to for posterior credible interval. |
true |
The true value of the parameter (if the data are simulated). |
hgtrim |
The quantile below which simulated hypergamma simulated priors are kept. |
Invisible NULL
Howard J. Seltman <hseltman@stat.cmu.edu>
http://www.stat.cmu.edu/~hseltman/rube
## Fake posterior for a N(0,10) prior. priPost(rnorm(100), "Normal", c(0,10))