rkillick / changepoint

A place for the development version of the changepoint package on CRAN.
127 stars 33 forks source link

Add Bernoulli distribution #81

Open Neverstop7 opened 4 months ago

Neverstop7 commented 4 months ago

Hi all! First of all thank you for creating the changepoint R package! I think it would be useful to analyse changepoints in binary data. Is it possibile to support Bernoulli distribution? Since both the mean and the variance of a bernoulli distribution depend on the probability of success p, I would say that this distribution will only be available for the cpt.meanvar() function. Thank you!

y = c(rbinom(50,size=1,prob=0.2),rbinom(50,size=1,prob=0.8))

rkillick commented 1 week ago

The Bernoulli distribution is available inside the binary branch. It is still undergoing testing and then will be merged in a future release.