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

Robustness to outliers #15

Open Neverstop7 opened 2 months ago

Neverstop7 commented 2 months ago

Hello! This is not a real issue but just a suggestion. I have noticided that EnvCpt is not robust to outliers (see code below). It might be useful to have an additional argument in envcpt() to choose if to perform a robust changepoint analysis or not (See 'robust' argument in the stl() function of the stats R package). Thank you!

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

with outlier y[20]=200 out = envcpt(y) which.min(BIC(out)) plot(out$meancpt,type="p")