Could someone please explain change point to me. I’m using the package in R, and I don’t really understand what the different methods mean, the pros and cons of each, and I especially do not understand the penalty value. When you increase the penalty value, what does that mean and what does it do?
I have done a good amount of research online but I just keep finding the cran R and quick R sites, which are good, but the way they say it just isn’t cutting it for me.
Thanks so much.
There are 3 main functions in the changepoint package,
cpt.meanvar. As a practitioner these are the only functions in the package that you should need. If you think that your data may contain a change in mean then you use the
cpt.mean function, etc.
The next question you should ask yourself if whether you are looking for a single or multiple changes within your data. The
method argument handles this, there is AMOC for At Most One Change, and PELT, BinSeg and SegNeigh for multiple changes. Which multiple changepoint method you want to use depends on:
a) Your choice of distribution / distribution-free method (see below) and
b) How much time you have / how accurate you want your answer to be.
The BinSeg is quick but approximate, PELT is exact and quick but cannot be used in all distributions, SegNeigh is exact but slow.
The next question is what assumptions you can / are willing to make about your data. The key here is that the assumption applies to each set of data between changes and not for the entire data. For example, you may be able to assume a Normal distribution but if you do a test for Normality on the entire data it will most likely fail (due to the potential changes). Thus typically we make an assumption, run the changepoint analysis then check the assumptions based on the changes identified.
Again, depending on the type of change there are different distribution and distribution-free methods. See the documentation for each function for the choices and feel free to comment which test statistic you are thinking of using and I can list the assumptions.
Finally, you look at the penalty. The penalty provides a compromise between lots of small changes and no changes. Thus if you set the penalty to 0 then you get a change at every possible location and if you set the penalty to infinity then you get no changes. The appropriate value of the penalty depends on your data and the question you want to answer.
For example, you might have changes in mean of 0.5 units but you might only be interested in changes of 1+ units.
There are many ways to choose your penalty:
“by-eye”, i.e. try a few different values until you find one that looks appropriate for your problem.
“elbow-plot”, i.e. plot the number of changepoints identified against the penalty used. This creates a curve whereby small values of the penalty produces large (spurious) changes and as the penalty decreases these spurious changes drop off at a fast rate, this rate slows as only true changes are left before slowly dropping down to no changes for larger penalties. The idea is to fit 2 straight lines to this curve and choose the penalty where they cross. This produces an ad-hoc but more objective way to choose the penalty than 1.
use an information criterion. There are some such as AIC, BIC/SIC, Hannan-Quinn included in the package. There are others that are not included in the package but you can provide a formula for
pen.valueif you wish.
If you need any more information or clarification on specific points, just comment and i’ll try to answer.