Package: mcp 0.4.0

Jonas Kristoffer Lindeløv

mcp: Regression with Multiple Change Points

Flexible and informed regression with Multiple Change Points. 'mcp' can infer change points in means, variances, autocorrelation structure, and any combination of these, as well as the parameters of the segments in between. All parameters are estimated with uncertainty and posterior predictive intervals are supported - also near the change points. 'mcp' supports hypothesis testing via Savage-Dickey density ratio, posterior contrasts, and PSIS-LOO model comparison. The 'mcp' framework is introduced in Lindeløv (2020) <doi:10.31219/osf.io/fzqxv>.

Authors:Jonas Kristoffer Lindeløv [aut, cre]

mcp_0.4.0.tar.gz
mcp_0.4.0.zip(r-4.7-any)mcp_0.4.0.zip(r-4.6-any)
mcp_0.4.0.tar.gz(r-4.7-any)mcp_0.4.0.tar.gz(r-4.6-any)
mcp_0.4.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
mcp/json (API)

# Install 'mcp' in R:
install.packages('mcp', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/lindeloev/mcp/issues

Pkgdown/docs site:https://lindeloev.github.io

Uses libs:
  • jags– Just Another Gibbs Sampler for Bayesian MCMC
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

jagscpp

3.96 score 1 stars 1 packages 153 scripts 535 downloads 4 mentions 37 exports 57 dependencies

Last updated from:61df46afa7. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK266
source / vignettesOK212
linux-releaseOK275
windows-develOK168
windows-releaseOK298
wasm-releaseOK151

Exports:as_drawsas_draws_arrayas_draws_dfas_draws_matrixas_draws_rvarsbernoullicriterionfixefget_segment_tablehypothesisinterpolate_newdatais_mcpfitis.mcpfitlog_liklooloo_comparemcpmcp_columnsmcp_examplemcp_example_datamcp_parsnchainsndrawsnegbinomialniterationsphiplot_dparplot_parsposterior_epredposterior_linpredposterior_predictpp_checkprior_summaryranefsd_to_precvariableswaic

Dependencies:abindbackportsbayesplotcheckmateclicodacodetoolscpp11digestdistributionaldplyrfarverfuturefuture.applygenericsggdistggplot2ggridgesglobalsgluegtableisobandlabelinglatticelifecyclelistenvloomagrittrmatrixStatsnlmenumDerivparallellypatchworkpillarpkgconfigplyrposteriorpurrrquadprogR6RColorBrewerRcppreshape2rjagsrlangS7scalesstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
mcp: Regression with Multiple Change Pointsmcp-package
Extract MCMC Draws from 'mcpfit' Objectsas.array.mcpfit as.data.frame.mcpfit as.matrix.mcpfit as.mcmc.mcpfit as_draws as_draws.mcpfit as_draws_array as_draws_array.mcpfit as_draws_df as_draws_df.mcpfit as_draws_matrix as_draws_matrix.mcpfit as_draws_rvars as_draws_rvars.mcpfit tidy_draws.mcpfit
Bernoulli Family for mcpbernoulli
Pre-fitted example mcp modeldemo_fit
Index 'mcpfit' objectsdraws-index-mcp nchains nchains.mcpfit ndraws ndraws.mcpfit niterations niterations.mcpfit variables variables.mcpfit
Fitted and predicted values of 'mcp' models fitsexecute-mcp-model fitted fitted.mcpfit log_lik log_lik.mcpfit predict predict.mcpfit residuals residuals.mcpfit
Test Hypotheses Concerning Individual Parametershypothesis hypothesis.mcpfit
Returns a tibble with all combos of predictorsinterpolate_newdata
Checks if the Argument is an 'mcpfit' Objectis.mcpfit is_mcpfit
Information Criteria for Model ComparisonLOO loo loo.mcpfit loo_compare WAIC waic waic.mcpfit
Fit Multiple Linear Segments And Their Change Pointsmcp
Model data columnsmcp_columns
Run example modelsmcp_example mcp_example_data
Model parametersmcp_pars
Model formulas in mcpmcp-formula mcp_formula
Priors in mcpmcp-priors mcp_priors
Class 'mcpfit' of Models Fitted with the 'mcp' Packagemcpfit mcpfit-class
Extract Model Information from an 'mcpfit'family.mcpfit formula.mcpfit model-accessors-mcpfit model.frame.mcpfit nobs.mcpfit
Negative Binomial for mcpnegbinomial
Plot individual parametersplot_pars
Plot full fitsplot plot.mcpfit plot_dpar
Posterior prediction draws for 'mcpfit' objectsposterior_epred posterior_epred.mcpfit posterior_linpred posterior_linpred.mcpfit posterior_predict posterior_predict.mcpfit
Prior and Posterior Covariance and Central Intervals for 'mcpfit' Objectsconfint.mcpfit posterior-uncertainty-mcpfit vcov.mcpfit
Posterior Predictive Checks For Mcpfit Objectspp_check pp_check.mcpfit
Print mcplistprint.mcplist
Nice Printing of Multiline Textsprint.mcptext
Summarise priors used by an mcp modelprior_summary prior_summary.mcpfit
Transform an mcp prior to the parameterization used by JAGSsd_to_prec
Summarise mcpfit objectscoef.mcpfit fixef fixef.mcpfit print print.mcpfit print.mcpsummary ranef ranef.mcpfit summary summary.mcpfit