# CompCredibility: Comparison of two profiles with credibility intervals In EBS: Exact Bayesian Segmentation

## Description

Given two conditions, computes the posterior distribution of the difference of change-point locations, and its credibility interval.

## Usage

 `1` ```CompCredibility(x, Conditions, Tau = numeric(), K = numeric()) ```

## Arguments

 `x` An object of class EBSProfiles. `Conditions` A vector of length 2 containing the index of the two conditions to compare. `Tau` A vector of length 2 containing the index of the change-point of interest of the two conditions to compare. `K` A vector of length 2 containing the maximum number of segments for the segmentation of each of the two profiles to compare.

## Details

This function is used to compute the posterior credibility interval of the difference of change-point locations between two profiles assumed to be independant.

## Value

 `Distribution` Posterior distribution of the difference between the location of change-points of interest for the two conditions `masswith0` Mass of the smallest credibility interval up to and including data-point 0 `massto0` Mass of the smallest credibility interval up to but excluding data-point 0

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

Johnson, Kotz & Kemp: Univariate Discrete Distributions

Hall, Kay & Titterington: Asymptotically optimal difference-based estimation of variance in non-parametric regression

`EBSProfiles`, `EBSStatistic`
 ```1 2 3 4 5 6 7``` ```# changes for Poisson model set.seed(1) x1<-c(rpois(125,1),rpois(100,5),rpois(50,1),rpois(75,5),rpois(50,1)) x2<-c(rpois(125,3),rpois(75,4),rpois(75,1),rpois(125,8)) M<-rbind(x1,x2) E <- EBSProfiles(M,model=1,K=10) out<-CompCredibility(E,Conditions=c(1,2),Tau=c(1,1),K=c(5,4)) ```