IDEAS home Printed from https://ideas.repec.org/p/osf/osfxxx/fzqxv.html
   My bibliography  Save this paper

mcp: An R Package for Regression With Multiple Change Points

Author

Listed:
  • Lindeløv, Jonas Kristoffer

Abstract

The R package mcp does flexible and informed Bayesian regression with change points. mcp can infer the location of changes between regression models on means, variances, autocorrelation structure, and any combination of these. Prior and posterior samples and summaries are returned for all parameters and a rich set of plotting options is available. Bayes Factors can be computed via Savage-Dickey density ratio and posterior contrasts. Cross-validation can be used for more general model comparison. mcp ships with sensible defaults, including priors, but the user can override them to get finer control of the models and outputs. The strengths and limitations of mcp are discussed in relation to existing change point packages in R.

Suggested Citation

  • Lindeløv, Jonas Kristoffer, 2020. "mcp: An R Package for Regression With Multiple Change Points," OSF Preprints fzqxv, Center for Open Science.
  • Handle: RePEc:osf:osfxxx:fzqxv
    DOI: 10.31219/osf.io/fzqxv
    as

    Download full text from publisher

    File URL: https://osf.io/download/5e125334573419015f80355f/
    Download Restriction: no

    File URL: https://libkey.io/10.31219/osf.io/fzqxv?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Carpenter, Bob & Gelman, Andrew & Hoffman, Matthew D. & Lee, Daniel & Goodrich, Ben & Betancourt, Michael & Brubaker, Marcus & Guo, Jiqiang & Li, Peter & Riddell, Allen, 2017. "Stan: A Probabilistic Programming Language," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 76(i01).
    2. Zeileis, Achim & Leisch, Friedrich & Hornik, Kurt & Kleiber, Christian, 2002. "strucchange: An R Package for Testing for Structural Change in Linear Regression Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 7(i02).
    3. D. A. Stephens, 1994. "Bayesian Retrospective Multiple‐Changepoint Identification," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 43(1), pages 159-178, March.
    4. Killick, Rebecca & Eckley, Idris A., 2014. "changepoint: An R Package for Changepoint Analysis," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 58(i03).
    5. Zeileis, Achim & Kleiber, Christian & Kramer, Walter & Hornik, Kurt, 2003. "Testing and dating of structural changes in practice," Computational Statistics & Data Analysis, Elsevier, vol. 44(1-2), pages 109-123, October.
    6. Bates, Douglas & Mächler, Martin & Bolker, Ben & Walker, Steve, 2015. "Fitting Linear Mixed-Effects Models Using lme4," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 67(i01).
    7. Marcus R. Munafò & Brian A. Nosek & Dorothy V. M. Bishop & Katherine S. Button & Christopher D. Chambers & Nathalie Percie du Sert & Uri Simonsohn & Eric-Jan Wagenmakers & Jennifer J. Ware & John P. A, 2017. "A manifesto for reproducible science," Nature Human Behaviour, Nature, vol. 1(1), pages 1-9, January.
    8. Ross, Gordon J., 2015. "Parametric and Nonparametric Sequential Change Detection in R: The cpm Package," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 66(i03).
    9. Bradley P. Carlin & Alan E. Gelfand & Adrian F. M. Smith, 1992. "Hierarchical Bayesian Analysis of Changepoint Problems," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 41(2), pages 389-405, June.
    10. James, Nicholas A. & Matteson, David S., 2015. "ecp: An R Package for Nonparametric Multiple Change Point Analysis of Multivariate Data," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 62(i07).
    11. Sangyeol Lee & Jeongcheol Ha & Okyoung Na & Seongryong Na, 2003. "The Cusum Test for Parameter Change in Time Series Models," Scandinavian Journal of Statistics, Danish Society for Theoretical Statistics;Finnish Statistical Society;Norwegian Statistical Association;Swedish Statistical Association, vol. 30(4), pages 781-796, December.
    12. Jonah Gabry & Daniel Simpson & Aki Vehtari & Michael Betancourt & Andrew Gelman, 2019. "Visualization in Bayesian workflow," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 182(2), pages 389-402, February.
    13. Erdman, Chandra & Emerson, John W., 2007. "bcp: An R Package for Performing a Bayesian Analysis of Change Point Problems," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 23(i03).
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Nora M. Villanueva & Marta Sestelo & Miguel M. Fonseca & Javier Roca-Pardiñas, 2023. "seq2R: An R Package to Detect Change Points in DNA Sequences," Mathematics, MDPI, vol. 11(10), pages 1-20, May.
    2. Ross, Gordon J., 2015. "Parametric and Nonparametric Sequential Change Detection in R: The cpm Package," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 66(i03).
    3. Rui Qiang & Eric Ruggieri, 2023. "Autocorrelation and Parameter Estimation in a Bayesian Change Point Model," Mathematics, MDPI, vol. 11(5), pages 1-22, February.
    4. Ruggieri, Eric & Antonellis, Marcus, 2016. "An exact approach to Bayesian sequential change point detection," Computational Statistics & Data Analysis, Elsevier, vol. 97(C), pages 71-86.
    5. Patrik Nosil & Zachariah Gompert & Daniel J. Funk, 2024. "Divergent dynamics of sexual and habitat isolation at the transition between stick insect populations and species," Nature Communications, Nature, vol. 15(1), pages 1-15, December.
    6. Barakat, Bilal Fouad & Dharamshi, Ameer & Alkema, Leontine & Antoninis, Manos, 2021. "Adjusted Bayesian Completion Rates (ABC) Estimation," SocArXiv at368, Center for Open Science.
    7. Zeileis, Achim, 2006. "Implementing a class of structural change tests: An econometric computing approach," Computational Statistics & Data Analysis, Elsevier, vol. 50(11), pages 2987-3008, July.
    8. James Nolan & Zoe Laulederkind, 2022. "Plane to See? Empirical Analysis of the 1999–2006 Air Cargo Cartel," Advances in Airline Economics, in: The International Air Cargo Industry, volume 9, pages 241-262, Emerald Group Publishing Limited.
    9. Ashok Chanabasangouda Patil & Shailesh Rastogi, 2020. "Multifractal Analysis of Market Efficiency across Structural Breaks: Implications for the Adaptive Market Hypothesis," JRFM, MDPI, vol. 13(10), pages 1-18, October.
    10. João Sousa Andrade & Adelaide Duarte & Marta Simões, 2011. "Inequality and Growth in Portugal: a time series analysis," GEMF Working Papers 2011-11, GEMF, Faculty of Economics, University of Coimbra.
    11. Addona Vittorio & Yates Philip A, 2010. "A Closer Look at the Relative Age Effect in the National Hockey League," Journal of Quantitative Analysis in Sports, De Gruyter, vol. 6(4), pages 1-19, October.
    12. de Silva, Ashton J & Boymal, Jonathan & Potts, Jason & Thomas, Stuart, 2015. "Does innovation in residential mortgage products explain rising house prices? No," MPRA Paper 62548, University Library of Munich, Germany.
    13. DIMA, Bogdan & DIMA, Ştefana Maria & IOAN, Roxana, 2021. "Remarks on the behaviour of financial market efficiency during the COVID-19 pandemic. The case of VIX," Finance Research Letters, Elsevier, vol. 43(C).
    14. Ardia, David & Dufays, Arnaud & Ordás Criado, Carlos, 2023. "Linking Frequentist and Bayesian Change-Point Methods," MPRA Paper 119486, University Library of Munich, Germany.
    15. Abhijit Sharma & Kelvin G Balcombe & Iain M Fraser, 2009. "Non-renewable resource prices: Structural breaks and long term trends," Economics Bulletin, AccessEcon, vol. 29(2), pages 805-819.
    16. Andrew J Tanentzap & Samuel Cottingham & Jérémy Fonvielle & Isobel Riley & Lucy M Walker & Samuel G Woodman & Danai Kontou & Christian M Pichler & Erwin Reisner & Laurent Lebreton, 2021. "Microplastics and anthropogenic fibre concentrations in lakes reflect surrounding land use," PLOS Biology, Public Library of Science, vol. 19(9), pages 1-18, September.
    17. Fabio Clementi & Marco Gallegati & Mauro Gallegati, 2015. "Growth and Cycles of the Italian Economy Since 1861: The New Evidence," Italian Economic Journal: A Continuation of Rivista Italiana degli Economisti and Giornale degli Economisti, Springer;Società Italiana degli Economisti (Italian Economic Association), vol. 1(1), pages 25-59, March.
    18. Bennett Kleinberg & Isabelle Vegt & Paul Gill, 2021. "The temporal evolution of a far-right forum," Journal of Computational Social Science, Springer, vol. 4(1), pages 1-23, May.
    19. Liu, Guanchun & He, Lei & Yue, Yiding & Wang, Jiying, 2014. "The linkage between insurance activity and banking credit: Some evidence from dynamic analysis," The North American Journal of Economics and Finance, Elsevier, vol. 29(C), pages 239-265.
    20. F. Peters & J. P. Mackenbach & W. J. Nusselder, 2016. "Does the Impact of the Tobacco Epidemic Explain Structural Changes in the Decline of Mortality?," European Journal of Population, Springer;European Association for Population Studies, vol. 32(5), pages 687-702, December.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:osf:osfxxx:fzqxv. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: OSF (email available below). General contact details of provider: https://osf.io/preprints/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.