mcmcSummary {smfsb} | R Documentation |
Summarise and plot tabular MCMC output
Description
This function summarises and plots tabular MCMC output such as that
generated by the function normgibbs
.
Usage
mcmcSummary(mat, rows = 4, lag.max=100, bins=30, show = TRUE, plot = TRUE, truth = NULL)
Arguments
mat |
Matrix of MCMC output, where the columns represent variables and the rows represent iterations. |
rows |
Number of variables to plot per page on the graphics device. |
lag.max |
Maximum lag for the ACF plots. |
bins |
Approximate number of bins to use for the histograms. |
show |
If |
plot |
If |
truth |
Optional vector of "true values", one for each variable, for the case where an algorithm is being tested on synthetic data for known parameters. The plots will be annotated with a red line indicating the true value. |
Value
An R summary
object.
See Also
Examples
out=normgibbs(N=1000,n=15,a=3,b=11,cc=10,d=1/100,xbar=25,ssquared=20)
names(out)=c("mu","tau")
mcmcSummary(out,rows=2,bins=10,truth=c(25,1/20))
[Package smfsb version 1.5 Index]