rkillick/changepoint

Can cpt.reg class still be used?

fbonaita opened this issue · 1 comments

Hi,

First of all, changepoint and its derived libraries are great, thanks for releasing them!

In particular, I quite like the capability of EnvCpt to fit piecewise linear trends and knowing it calls the changepoint library I was looking to replace the former directly with latter in my scripts.
However, I noticed the cpt.reg class is currently commented out in cpt.R (changepoint v2.3) and it'd be helpful to get clarity on a couple of points, if possible:

  1. Is there a reason for cpt.reg being available via EnvCpt but not changepoint?
  2. For future use of cpt.reg, would you recommend to stick to EnvCpt?

Thanks for getting in touch.

  1. This was because originally the code was hardcoded for AR1 and time-trend, i.e. the options in EnvCpt. This was extended to general regression structures by a PhD student at Lancaster and that was incorporated into EnvCpt following initial testing.
  2. We are planning to move the functionality from EnvCpt back to changepoint in our next big release as we have thoroughly tested the general regression code now. cpt.reg() was commented out in changepoint as the initial implementation used the lm() function which was slower than the strucchange implementation. I didn't want to repeat functionality that was slower than elsewhere so we removed it from the package (commented it out incase it was useful to someone else) in a very early version.

To summarize, the functionality will move to changepoint but it is unlikely to happen until the end of the year due to other workloads. So depending on the timescales in your project, you may want to just use the EnvCpt version for now. We will keep back compatibility with the envcpt() call and if you depend on the package (and release to CRAN to we know) then we will send you a notification email prior to the change for information.