plot.bcp: Plotting Bayesian change point results

Description Usage Arguments Details Author(s) See Also Examples

Description

plot.bcp() produces summary plots of the results of bcp(). Currently, only the summary plots for serial data are implemented. If an adjacency structure (adj) is provided, then the data are assumed to reside on nodes of a general graph. Additional parameters are used in this graph change point model.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'bcp'
plot(x, separated = FALSE, outer.margins = list(left =
  unit(4, "lines"), bottom = unit(3, "lines"), right = unit(2, "lines"),
  top = unit(2, "lines")), lower.area = unit(0.33, "npc"),
  size.points = unit(0.25, "char"), pch.points = 20, colors = NULL,
  main = NULL, xlab = NULL, xaxlab = NULL,
  cex.axes = list(cex.xaxis = 0.75, cex.yaxis.lower = 0.75,
  cex.yaxis.upper.default = 0.75, cex.yaxis.upper.separated = 0.5),
  lwd = 1, ...)

Arguments

x

the result of a call to bcp().

separated

logical. If set to TRUE and the data is multivariate, each series is plotted separately.

outer.margins

(optional) list of units specifying the left, bottom, right and top margins. For more information on units, see the documentation for grid.

lower.area

(optional) unit specifying the proportion of the plot occupied by the posterior probabilities of change points.

size.points

(optional) unit specifying the size of the data points.

pch.points

(optional) unit specifying the style of the data points.

colors

(optional) vector specifying the colors in which to plot each data series.

main

(optional) plot title. Use "" for no title.

xlab

(optional) a character string specifying the x-axis label. Defaults to "Location".

xaxlab

(optional) a vector having length equal to the number of observations giving the x-axis tick labels. Defaults to the sequence from 1 to n.

cex.axes

(optional) list specifying the sizes of the axes labels. cex.xaxis specifies the size of the x-axis label, cex.yaxis.lower specifies the size of the y-axis label of the posterior probability plot, cex.yaxis.upper.default specifies the size of the y-axis labels of the posterior means plot when the series are displayed in a single plot, and cex.yaxis.upper.separated specifies the size of the y-axis labels of the posterior means plots when each series is plotted separately.

lwd

line width

...

(optional) additional arguments, ignored.

Details

plot.bcp() produces the following plots using grid graphics instead of base:

Posterior Means: location in the sequence versus the posterior means over the iterations.

Posterior Probability of a Change: location in the sequence versus the relative frequency of iterations which resulted in a change point.

Author(s)

Xiaofei Wang, Chandra Erdman, and John W. Emerson

See Also

legacyplot, bcp, summary.bcp, and print.bcp for complete results and summary statistics.

Examples

1
2
3
4
5
testdata <- cbind( c(rnorm(50), rnorm(50, -5, 1), rnorm(50)),
c(rnorm(50), rnorm(50, 10.8, 1), rnorm(50, -3, 1)) )
bcp.0 <- bcp(testdata)
plot(bcp.0, main="Multivariate (k=2) Change Point Example")
plot(bcp.0, separated=TRUE, main="Multivariate (k=2) Change Point Example")

bcp documentation built on May 2, 2019, 9:16 a.m.