rkillick / changepoint

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

Should cpt.var allow minseglen = 1? #57

Open Eric6346 opened 3 years ago

Eric6346 commented 3 years ago

For the Normal assumption with unknown mean, assuming the length of the time series is at least 2, cpt.var should allow segments of length 1. This would rarely make any difference in practice, but in theory, I don't think there's anything wrong with segments of length 1.

rkillick commented 3 years ago

Thanks for raising this. I think that you are correct that with a global mean we can have the minimum segment length at 1. We would need to catch a variance of 0 if a single datapoint has the same value as the global mean but that is doable. I'll put it on the list of things to do.