\name{RNC} \alias{RNC} \alias{maxRNC} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Brooks-Gelman-Rubin R, Effective Sample Size, and Autocorrelation} \description{ For a parameter set creates a list of the three most useful statistics for judging sufficiency of the MCMC sample: \code{R} --- Brooks, Gelman Rubin multivariate potential scale reduction factor, \code{N} --- the effective sample size, and \code{C} --- the lag 5 autocorrelation. The function \code{maxRNC} provides the maximum values for those statistics across its arguments. } \usage{ RNC(ps) maxRNC(pslist) } \arguments{ \item{ps}{A parameter set (or other coda \code{mcmc}) object} \item{pslist}{A list of parameter set (or other coda \code{mcmc}) objects} } \details{ The function \code{RNC} applies the functions \code{mpsrf} with arguments \code{transform=TRUE} and \code{autoburnin=FALSE}, \code{effectiveSize}, and \code{autocorr.diag} with \code{lag=5} to the \code{ps} argument. Returns the three diagnostics as a list. The function \code{maxRNC()} applies \code{RNC()} to each of its arguments and then returns the maximum of the \code{R} and \code{C} components and the minimum of the \code{N} component (where the maximium is done separately for each component). These three statistics are the generally most useful when looking at the convergence of the chain. The \code{R} component provides a useful diagnostic for convergence, the \code{N} component provides a guide as to the sufficiency of the sample, and the \code{C} component helps identify problems with slow mixing. } \value{ \item{R}{The Brooks-Gelman-Rubin multivariate potential scale reduction factor.} \item{N}{The effective sample size of the series.} \item{C}{The lag 5 autocorrelation of the series.} } \author{Russell Almond} \seealso{\code{\link{mpsrf}}, \code{\link[coda]{effectiveSize}}, \code{\link[coda]{autocorr.diag}} } \examples{ StatShop <- Sys.getenv("STATSHOP") if (StatShop == "") { warn("StatShop not installed, skipping test.") } else { asp.dbConnect("parameter_recovery_test","junit") ## Get information about the student model. smname <- listStudentModels()[1] pname <- listParameterNames(smname) ## Look at the first parameter in the student model. RNC(getParameterVector(smname,pname[1])) ## Look at all prameters in the first model maxRNC(getAllParameters(listModels()[1])) ## Look at all link models dc <- daCapo() maxRNC(unlist(dc$linkModels,recursive=FALSE)) } } \keyword{ts}% __ONLY ONE__ keyword per line