diagnostics {nclSLR} | R Documentation |
This function generates graphical diagnostics for an array of MCMC output such
as that returned by applying the function to.array
to a stanfit
object. For every parameter, a row of three plots is generated: a trace plot,
an ACF plot and a kernel density plot. If there is output from more than one
chain, the default behaviour is to overlay the plots for different chains in
different colours.
diagnostics(mcmc, rows = 3, lag.max = 50, pool = FALSE, colours = NULL)
mcmc |
A matrix with dimensions: iterations, parameters; or a three
dimensional array with dimensions: iterations, chains, parameters. The final
(i.e. parameter) component of the |
rows |
A number indicating the number of parameters to plot per page on the graphics device. |
lag.max |
A number indicating the maximum lag for the ACF plots. |
pool |
A logical. If |
colours |
A vector indicating the colours to use to represent each chain.
Colours can be specified using any of the three kinds of R colour
specifications, i.e. a colour name (as listed by |
NULL
srs = array(rnorm(8000), c(1000, 2, 4)) # Example for illustration only! dimnames(srs) = list(NULL, NULL, paste("theta[",1:4,"]",sep="")) diagnostics(srs)