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

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

View source: R/Profiles.R

Description

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

Usage

1
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.

Details

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

Value

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

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

Examples

1
2
3
4
5
# 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')

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