Learn R Programming

cpop (version 1.0.8)

Detection of Multiple Changes in Slope in Univariate Time-Series

Description

Detects multiple changes in slope using the CPOP dynamic programming approach of Fearnhead, Maidstone, and Letchford (2019) . This method finds the best continuous piecewise linear fit to data under a criterion that measures fit to data using the residual sum of squares, but penalizes complexity based on an L0 penalty on changes in slope. Further information regarding the use of this package with detailed examples can be found in Fearnhead and Grose (2024) .

Copy Link

Version

Install

install.packages('cpop')

Monthly Downloads

235

Version

1.0.8

License

GPL (>= 2)

Maintainer

Daniel Grose

Last Published

June 11th, 2025

Functions in cpop (1.0.8)

cpop.crops.models

Extract the cpop models created by cpop.crops
cost

Calculate the cost of a model fitted by cpop
cpop.crops

Calculate changepoint locations over a range of penalty values
cpop

Find the best segmentation of data for a change-in-slope model
plot

Visualise changepoint locations and associated data
changepoints

Changepoint locations
fitted

Extract model fitted values
show

Display the S4 object produced by cpop
estimate

Estimate the fit of a cpop model
residuals

Extract residuals from a cpop model
simchangeslope

Generate simulated data
wavenumber_spectra

Wavenumber power spectra data
summary

Summarise a cpop analysis