Back to directory

mcp: Regression with Multiple Change Points

An R package that fits Bayesian regression models with one or more change points between linear or generalized linear segments.

mcp: Regression with Multiple Change Points

mcp is an R package for regression with one or multiple change points, the points where data shifts from being better explained by one linear segment to the next. These are also known in other fields as switch points, break points, or segmented, piecewise, or discontinuity models, and mcp aims to support all of them within one interface.

A model is specified as a list of formulas, one per segment, and mcp turns this formula representation into JAGS code and fits it with Bayesian inference, using tidybayes, bayesplot, coda, and loo for analysis and plotting. It reports fitted lines, change-point posterior densities, and posterior summaries with sampling diagnostics.

It installs from CRAN or from GitHub with remotes, and requires JAGS to be installed separately.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.