EBSPlotProba: Plot distribution of changepoints of one profile

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/EBS.R

Description

Given a profile and its number of segments, plots the posterior distribution of each of the change-points

Usage

1

Arguments

x

An object of class EBS returned by function EBSegmentation applied to data of interest.

K

The number of segments of the segmentation for which the posterior distributions are wanted. Must have 2<K<x$Kmax

data

A logical vector. If TRUE, the data is plotted as well as the posterior distributions. By default, data=FALSE.

file

An object of type string. If filled, the plot is saved in a file which name is given by the file argument, and which type is given by argument type.

type

An object of type string. If file is filled, argument type determines the type of the file saved. Possible values are 'pdf', 'png' and 'ps'. By default, 'pdf' is used.

Details

For a single profile, this function is used to plot the posterior distribution of all changepoints of a segmentation in K segments.

Value

A plot of the posterior distributions.

Author(s)

Alice Cleynen

References

Rigaill, Lebarbier & Robin (2012): Exact posterior distributions over the segmentation space and model selection for multiple change-point detection problems Statistics and Computing

Cleynen & Robin (2014): Comparing change-point location in independent series Statistics and Computing

See Also

EBSegmentation, EBSDistrib

Examples

1
2
3
4
5
6
# changes for Poisson model
set.seed(1)
x<-c(rpois(125,1),rpois(100,5),rpois(50,1),rpois(75,5),rpois(50,1))
out <- EBSegmentation(x,model=1,Kmax=20)
EBSPlotProba(out,4)
EBSPlotProba(out,4,data=TRUE,file="mysegmentation.png",type='png')

EBS documentation built on May 2, 2019, 4:55 p.m.