Dear List,

I am using the cpt.mean() function in the "changepoint" package to detect 
change-points in my data and noticed that when there are no visible changes, 
the function returns the last point as the point of change. The following 
script can illustrate this:

table(unlist(replicate(500,cpt.mean(rnorm(50),method="PELT")@cpts)))

the result will return a uniform distribution from 1 to 49 (with ca 20 cpts 
located for each), and then 500 cases where the cpts is located on the last 
vector. Clearly, cpt.mean returns the index of the last vector value (here 50) 
for change in the time-series. I wonder if I am doing something wrong here, but 
I think the function should return a NA... 

Many thanks in advance,
Enrico 

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to