rmeanplot1: Running Mean Plot for a Single Parameter in MCMC Output

Description Usage Arguments Value Author(s) See Also Examples

Description

Creates a trace plot of a running mean for one parameter in an MCMC simulation. This function is called by the mcmcplot function, and is intended for internal use only.

Usage

1
rmeanplot1(x, col = NULL, lty = 1, style = c("gray", "plain"), ...)

Arguments

x

an mcmc.list object with a single variable.

col

one or more colors for the trace lines. Default is mcmcplotsPalette(nchains).

lty

one or more line types for the trace lines.

style

if "gray", then the plotting region is printed with a gray background, otherwise the default plotting region is used.

...

further arguments passed to the plotting function.

Value

Creates a plot.

Author(s)

S. McKay Curtis

See Also

mcmcplot1, denoverplot1, autplot1, traplot1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)))))

rmeanplot(fakemcmc[, "alpha[5]", drop=FALSE])
rmeanplot(fakemcmc[, "alpha[5]", drop=FALSE], style="plain")


Search within the mcmcplots package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.