Rev 6221 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{trellisplots}\title{Trellis plots for mcmc objects}\alias{densityplot.mcmc}\alias{levelplot.mcmc}\alias{qqmath.mcmc}\alias{xyplot.mcmc}\alias{densityplot.mcmc.list}\alias{levelplot.mcmc.list}\alias{qqmath.mcmc.list}\alias{xyplot.mcmc.list}\alias{acfplot}\alias{acfplot.mcmc}\alias{acfplot.mcmc.list}\usage{\method{densityplot}{mcmc}(x, data,outer, aspect = "xy",default.scales = list(relation = "free"),start = 1, thin = 1,main = attr(x, "title"),xlab = "",plot.points = "rug",\dots,subset)\method{densityplot}{mcmc.list}(x, data,outer = FALSE, groups = !outer,aspect = "xy",default.scales = list(relation = "free"),start = 1, thin = 1,main = attr(x, "title"),xlab = "",plot.points = "rug",\dots,subset)\method{levelplot}{mcmc}(x, data, main = attr(x, "title"),start = 1, thin = 1,\dots,xlab = "", ylab = "",cuts = 10, at,col.regions = topo.colors(100),subset)\method{qqmath}{mcmc}(x, data,outer, aspect = "xy",default.scales = list(y = list(relation = "free")),prepanel = prepanel.qqmathline,start = 1, thin = 1,main = attr(x, "title"),ylab = "",\dots,subset)\method{qqmath}{mcmc.list}(x, data,outer = FALSE, groups = !outer,aspect = "xy",default.scales = list(y = list(relation = "free")),prepanel = prepanel.qqmathline,start = 1, thin = 1,main = attr(x, "title"),ylab = "",\dots,subset)\method{xyplot}{mcmc}(x, data,outer, layout = c(1, nvar(x)),default.scales = list(y = list(relation = "free")),type = 'l',start = 1, thin = 1,xlab = "Iteration number",ylab = "",main = attr(x, "title"),\dots,subset)\method{xyplot}{mcmc.list}(x, data, outer = FALSE, groups = !outer,aspect = "xy", layout = c(1, nvar(x)),default.scales = list(y = list(relation = "free")),type = 'l',start = 1, thin = 1,xlab = "Iteration number",ylab = "",main = attr(x, "title"),\dots,subset)acfplot(x, data, \dots)\method{acfplot}{mcmc}(x, data, outer,prepanel, panel,type = 'h',aspect = "xy",start = 1, thin = 1,lag.max = NULL,ylab = "Autocorrelation",xlab = "Lag",main = attr(x, "title"),\dots,subset)\method{acfplot}{mcmc.list}(x, data, outer = FALSE, groups = !outer,prepanel, panel,type = if (groups) 'b' else 'h',aspect = "xy",start = 1, thin = 1,lag.max = NULL,ylab = "Autocorrelation",xlab = "Lag",main = attr(x, "title"),\dots,subset)}\description{These methods use the Trellis framework as implemented in the\code{lattice} package to produce space-conserving diagnostic plotsfrom \code{"mcmc"} and \code{"mcmc.list"} objects. The \code{xyplot}methods produce trace plots. The \code{densityplot} methods and\code{qqmath} methods produce empirical density and probabilityplots. The \code{levelplot} method depicts the correlation of theseries. The \code{acfplot} methods plot the auto-correlation in theseries.Not yet available in S-PLUS.}\arguments{\item{x}{ an \code{"mcmc"} or \code{"mcmc.list"} object. }\item{data}{ ignored, present for consistency with generic. }\item{outer}{ for the \code{"mcmc.list"} methods, a logical flag tocontrol whether multiple runs of a series are displayed in the samepanel (they are if \code{FALSE}, not if \code{TRUE}). If specifiedin the \code{"mcmc"} methods, this argument is ignored with awarning. }\item{groups}{ for the \code{"mcmc.list"} methods, a logical flag tocontrol whether the underlying \code{lattice} call will be supplieda \code{groups} arguments indicating which run a data pointoriginated from. The panel function is responsible for handlingsuch an argument, and will usually differentiate runs within a panelby using different graphical parameters. When \code{outer=FALSE},the default of \code{groups} is \code{TRUE} if the correspondingdefault panel function is able to make use of such information.When \code{outer=FALSE}, \code{groups=TRUE} will be ignored with awarning. }\item{aspect}{ controls the physical aspect ratio of the panel. See\code{\link[lattice:xyplot]{xyplot}} for details. The default forthese methods is chosen carefully - check what the default plotlooks like before changing this parameter.}\item{default.scales}{ this parameter provides a reasonable defaultvalue of the \code{scales} parameter for the method. It is unlikelythat a user will wish to change this parameter. Pass a value for\code{scales} (see \code{\link[lattice:xyplot]{xyplot}}) instead,which will override values specified here. }\item{type}{ a character vector that determines if lines, points,etc. are drawn on the panel. The default values for the methods arecarefully chosen. See\code{\link[lattice:panel.xyplot]{panel.xyplot}} for possiblevalues. }\item{thin}{ an optional thinning interval that is applied before theplot is drawn.}\item{start}{ an optional value for the starting point within theseries. Values before the starting point are considered part of the"burn-in" of the series and dropped.}\item{plot.points}{ character argument giving the style in whichpoints are added to the plot. See\code{\link[lattice:panel.densityplot]{panel.densityplot}} fordetails. }\item{layout}{a method-specific default for the \code{layout} argumentto the lattice functions.}\item{xlab,ylab,main}{Used to provide default axis annotations andplot labels.}\item{cuts, at}{ defines number and location of values where colorschange }\item{col.regions}{ color palette used }\item{lag.max}{ maximum lag for which autocorrelation is computed. Bydefault, the value chosen by \code{\link{acf}} is used }\item{prepanel,panel}{ suitable prepanel and panel functions for\code{acfplot}. The prepanel function omits the lag-0auto-correlation (which is always 1) from the range calculations. }\item{\dots}{other arguments, passed to the lattice function.Documentation of the corresponding generics in the \code{lattice}package should be consulted for possible arguments. }\item{subset}{indices of the subset of the series to plot. Thedefault is constructed from the \code{start} and \code{thin}arguments.}}\value{An object of class \code{"trellis"}. The relevant\code{\link[lattice:update.trellis]{update}} method can be used toupdate components of the object and the\code{\link[lattice:print.trellis]{print}} method (usually called bydefault) will plot it on an appropriate plotting device.}\seealso{\code{\link[lattice:Lattice]{Lattice}} for a brief introduction tolattice displays and links to further documentation.}\author{ Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}}\examples{data(line)\dontrun{xyplot(line)xyplot(line[[1]], start = 10)densityplot(line, start = 10)qqmath(line, start = 10)levelplot(line[[2]])acfplot(line, outer = TRUE)}}\keyword{hplot}