Description Usage Arguments Details Value Author(s) References See Also Examples
Creates an autocorrelation or partial autocorrelation plot of MCMC output.
1 2 3 |
x |
an |
chain |
the number of the parallel chain for plotting. The default is to use the first parallel chain. |
lag.max |
passed as an argument to the autocorrelation function |
partial |
logical indicating whether paritial autocorrelation should be plotted. |
col |
color of the bars in the plot. |
style |
if "gray", then the plotting region is printed with a gray background, otherwise the default plotting region is used. |
ylim |
limits for the y-axis. |
... |
further arguments passed to the plotting function. |
None.
Creates a plot.
S. McKay Curtis (adapted from Martyn Plummer's autcorr.plot
code in the coda package)
None.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Create fake MCMC output
nc <- 10; nr <- 1000
pnames <- c(paste("alpha[", 1:5, "]", sep=""), paste("gamma[", 1:5, "]", sep=""))
means <- rpois(10, 20)
fakemcmc <-
coda::as.mcmc.list(
lapply(1:3,
function(i)
coda::mcmc(matrix(rnorm(nc*nr, rep(means,each=nr)),
nrow=nr, dimnames=list(NULL,pnames)))))
autplot1(fakemcmc[, "alpha[1]", drop=FALSE])
autplot1(fakemcmc[, "alpha[1]", drop=FALSE], chain=2, style="plain")
autplot1(fakemcmc[, "alpha[1]", drop=FALSE], partial=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.