summary.bcp

0th

Percentile

Summarizing Bayesian change point analysis results

Summary and print methods for class bcp.

Keywords
datasets
Usage
# S3 method for bcp
summary(object, digits = max(3, .Options$digits - 3), ...)

# S3 method for bcp print(x, digits = max(3, .Options$digits - 3), ...)

Arguments
object

the result of a call to bcp().

digits

the number of digits displayed in the summary statistics.

...

(optional) additional arguments, ignored.

x

the result of a call to bcp().

Details

The functions print (and return invisibly) the estimated posterior probability of a change point for each position and the estimated posterior means. These results are modeled after the summary method of the coda package (Plummer et al., 2006). If return.mcmc=TRUE (i.e., if full MCMC results are returned), bcp objects can be converted into mcmc objects to view mcmc summaries -- see examples below.

Value

The matrix of results is returned invisibly.

See Also

bcp and plot.bcp.

Aliases
  • summary.bcp
  • print.bcp
Examples
# NOT RUN {
##### A random sample from a few normal distributions #####
testdata <- c(rnorm(50), rnorm(50, 5, 1), rnorm(50))
bcp.0 <- bcp(testdata)
summary(bcp.0)
plot(bcp.0, main="Univariate Change Point Example")

##### An MCMC summary from the ``coda'' package #####
# }
# NOT RUN {
if (require("coda")) {
  bcp.0 <- bcp(testdata, return.mcmc=TRUE)
  bcp.mcmc <- as.mcmc(t(bcp.0$mcmc.means))
  summary(bcp.mcmc)
  heidel.diag(bcp.mcmc) # an example convergence diagnostic
  # from the coda package.
}
# }
Documentation reproduced from package bcp, version 4.0.3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.