plot.bmk {LaplacesDemon} | R Documentation |
Plot Hellinger Distances
Description
This function plots Hellinger distances in an object of class bmk
.
Usage
## S3 method for class 'bmk'
plot(x, col=colorRampPalette(c("black","red"))(100),
title="", PDF=FALSE, Parms=NULL, ...)
Arguments
x |
This required argument is an object of class |
col |
This argument specifies the colors of the cells. By
default, the |
title |
This argument specifies the title of the plot, and the default does not include a title. |
PDF |
Logical. When |
Parms |
This argument accepts a vector of quoted strings to be matched for
selecting parameters for plotting. This argument defaults to
|
... |
Additional arguments are unused. |
Details
The plot.bmk
function plots the Hellinger distances in an
object of class bmk
. This is useful for quickly finding
portions of chains with large Hellinger distances, which indicates
non-stationarity and non-convergence.
See Also
Examples
library(LaplacesDemon)
N <- 1000 #Number of posterior samples
J <- 10 #Number of parameters
Theta <- matrix(runif(N*J),N,J)
colnames(Theta) <- paste("beta[", 1:J, "]", sep="")
for (i in 2:N) {Theta[i,1] <- Theta[i-1,1] + rnorm(1)}
HD <- BMK.Diagnostic(Theta, batches=10)
plot(HD, title="Hellinger distance between batches")