Using the changepoint R package to detect and estimate multiple change points with non-normality assumption for mean with the following codes


The results is, Changepoint type : Change in mean

Method of analysis : SegNeigh

Test Statistic : CUSUM

Type of penalty : BIC with value, 2.080237

Minimum Segment Length : 1

Maximum no. of cpts : 5

Changepoint Locations :

Range of segmentations:

   [,1]   [,2]   [,3]   [,4]   [,5]

[1,] 0 0 0 0 0

[2,] 1937 0 0 0 0

[3,] 10 5 0 0 0

[4,] 14 10 5 0 0

[5,] 384 382 377 266 0

For penalty values: 0 0.01702072 0.04016257 0.08605699 0.1370768


enter image description here

How could find out the location for change-points from this output? What does the graph telling about change-points?

CPM package for fixed (offline) data gives one change point on the location 2653. However, it can't handle for multiple change-point in offline procedure.

library(cpm); detectChangePointBatch(q[,2], "Mann-Whitney", alpha=0.05, lambda=NA);


1 Answer 1


What the output is telling you is the following:

  • There are no changepoints detected with the penalty used (hence blank on "changepoints" field)
  • The penalty value you entered (0.02) was not used as you specified BIC which gives a penalty value of 2.080237.
  • The plot reiterates this with a single horizontal line for the mean with no breaks in it.

If you want to use a penalty of 0.02 then you should put penalty="Manual" in the function call.

However, you don't need to play with the penalty as the "Range of Segmentations" in the output tells you that if there is 1 changepoint it is at 1937, for 2 they would be at 10 and 5 etc. You can change Q to get more segmentations listed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.