rkillick / EnvCpt

A place for the development version of the changepoint package on CRAN. The master thread is that from CRAN.
5 stars 14 forks source link

Ignore changes in variance #16

Open Neverstop7 opened 2 months ago

Neverstop7 commented 2 months ago

Hello! It seems that EnvCpt R package uses internally cpt.meanvar() function from the changepoint R package. The function cpt.meanvar() detects both changes in mean and variance. Suppose that I am only interested in changes in mean. How can I use the envcpt() function to ignore changes in variance?

library(EnvCpt) set.seed(123) y = c(rnorm(50,100,sd = 5),rnorm(50,100,sd = 50)) plot(y) out = envcpt(y) which.min(BIC(out)) plot(out$meancpt,type="p")

It would be nice if envcpt would detect no changepoints since the mean has not changed. Thank you in advance!