Learn R Programming

EBS (version 3.1)

PriorDistrib: Prior distribution of change-point when uniform prior on segmentation

Description

Computes the prior distribution of a given change-point when using a uniform prior on segmentation with known K

Usage

PriorDistrib(n,k,K)

Arguments

n
Integer giving length of dataset.
k
Integer of index of given change-point.
K
Integer giving number of segments in segmentation.

Value

A vector of length n with the change-point distribution.

Details

This function is used to compare prior and posterior change-point distributions.

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

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))
y=PriorDistrib(length(x),1,5)
plot(y,type='l')

Run the code above in your browser using DataLab