The mcp package provides an interface to fit regression models with multiple change points between generalized linear segments, optionally with per-segment variance and autocorrelation structures.
The main function of mcp is the
mcp() function, which uses a formula
syntax to specify a wide range of change point models. Based on the supplied
data, formulas, and additional information, it writes JAGS code on the fly
and use rstan to fit the model, optionally in parallel to speed up
sampling. You will need to install JAGS for
mcp() to work.
A large number of post-processing methods can be applied. These include
Summarise fits using
Visualize fits using
plot() and individual parameters using
Test hypotheses using
Extensive documentation with worked examples is available at the mcp website.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.