sixway {R2MLwiN}R Documentation

Draws a sixway plot of MCMC diagnostics.

Description

This function produces a variety of diagnostic plots and statistics for MCMC chains.

Usage

sixway(chain, name = NULL, acf.maxlag = 100, pacf.maxlag = 10, ...)

Arguments

chain

A numeric vector, mcmc object or mcmc.list object (in which case uses its thin argument, otherwise assumes thinning = 1), storing the MCMC chain for a chosen parameter.

name

The parameter name. If name = NULL, the column name of chain will be used, unless that is also NULL in which case 'x' is used.

acf.maxlag

Maximum lag at which to calculate the auto-correlation function. acf.maxlag = 100 by default. See acf.

pacf.maxlag

Maximum lag at which to calculate the partial auto-correlation function. pacf.maxlag = 10 by default. See pacf.

...

Other graphical parameters (see par for details).

Details

A variety of plots and statistics are displayed in an R graphic window, including the following:

Author(s)

Zhang, Z., Charlton, C.M.J., Parker, R.M.A., Leckie, G., and Browne, W.J. (2016) Centre for Multilevel Modelling, University of Bristol.

See Also

BD,MCSE,density,acf,pacf,raftery.diag,effectiveSize

Examples



## Not run: 
library(R2MLwiN)
# NOTE: if MLwiN not saved in location R2MLwiN defaults to, specify path via:
# options(MLwiN_path = 'path/to/MLwiN vX.XX/')
# If using R2MLwiN via WINE, the path may look like this:
# options(MLwiN_path = '/home/USERNAME/.wine/drive_c/Program Files (x86)/MLwiN vX.XX/')

## Example: tutorial
data(tutorial, package = "R2MLwiN")

(mymodel <- runMLwiN(normexam ~ 1 + standlrt + (1 + standlrt | school) + (1 | student),
                     estoptions = list(EstM = 1, resi.store.levs = 2), data = tutorial))

sixway(mymodel@chains[, "FP_standlrt", drop = FALSE], "beta_1")


## End(Not run)


[Package R2MLwiN version 0.8-9 Index]