Description Usage Arguments Value Note Author(s) References See Also Examples
Creates a graph window containing three different plots—a trace plot, a density plot, and an autocorrelation plot—for one parameter in an MCMC run. This function is used by mcmcplot
to construct an html file of MCMC diagnostics. This function is intended for internal use only.
1 2 |
x |
an |
col |
colors for plotting each parallel chain. The default is |
lty |
line types for plotting each parallel chain. The default is 1 for all parallel chains. |
xlim |
limits for the x axis of the density plot. |
ylim |
limits for the y axis of the density plot. |
style |
if "gray", then the plotting region is printed with a gray background, otherwise the default plotting region is used. |
greek |
if |
Creates a plot.
Only the first parallel chain is used to create the autocorrelation plot. This function is used by mcmcplot
to create html output for all the parameters of an MCMC simulation.
S. McKay Curtis
No references.
1 2 3 4 5 6 | ## Create fake MCMC output
fakemcmc <- coda::as.mcmc.list(coda::mcmc(sapply(1:5, function(dum) rnorm(1000))))
coda::varnames(fakemcmc) <- c("gamma[1,1]", "gamma[1,2]", "gamma[1,3]", "sigma[1]", "sigma[2]")
mcmcplot1(fakemcmc[, "sigma[1]", drop=FALSE])
mcmcplot1(fakemcmc[, "gamma[1,3]", drop=FALSE], style="plain")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.