Learn R Programming

EBS (version 3.1)

EBSDistrib: Probability of kth changepoint in a segmentation in K segments

Description

Calculates the bayesian posterior probability of a changepoint of a segmentation in K segments.

Usage

EBSDistrib(x, k, Kk)

Arguments

x
An object of class EBS returned by function EBSegmentation applied to data of interest.
k
The rank of the breakpoint for which the posterior distribution is wanted. Must have 0
Kk
The number of segments for the segmentation of interest.

Must have 2

Value

A vector containing distibution of kth changepoint in a segmentation in Kk segments.

Details

This function is used to compute the posterior distribution of kth changepoint for a segmentation in K segments.

References

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

See Also

EBSegmentation, EBSPlotProba

Examples

Run this code
# 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)
y1=EBSDistrib(out,1,5)
plot(y1,type='l')

Run the code above in your browser using DataLab