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

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

View source: R/EBS.R

Description

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

Usage

1
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<k<Kk

Kk

The number of segments for the segmentation of interest.

Must have 2<Kk<=x$Kmax

Details

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

Value

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

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

See Also

EBSegmentation, EBSPlotProba

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

EBS documentation built on May 29, 2017, 5:49 p.m.