Package: mcp 0.4.0
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:
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
- demo_fit - Pre-fitted example mcp model
Last updated from:61df46afa7. Checks:6 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 266 | ||
| source / vignettes | OK | 212 | ||
| linux-release | OK | 275 | ||
| windows-devel | OK | 168 | ||
| windows-release | OK | 298 | ||
| wasm-release | OK | 151 |
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 page | Topics |
|---|---|
| mcp: Regression with Multiple Change Points | mcp-package |
| Extract MCMC Draws from 'mcpfit' Objects | as.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 mcp | bernoulli |
| Pre-fitted example mcp model | demo_fit |
| Index 'mcpfit' objects | draws-index-mcp nchains nchains.mcpfit ndraws ndraws.mcpfit niterations niterations.mcpfit variables variables.mcpfit |
| Fitted and predicted values of 'mcp' models fits | execute-mcp-model fitted fitted.mcpfit log_lik log_lik.mcpfit predict predict.mcpfit residuals residuals.mcpfit |
| Test Hypotheses Concerning Individual Parameters | hypothesis hypothesis.mcpfit |
| Returns a tibble with all combos of predictors | interpolate_newdata |
| Checks if the Argument is an 'mcpfit' Object | is.mcpfit is_mcpfit |
| Information Criteria for Model Comparison | LOO loo loo.mcpfit loo_compare WAIC waic waic.mcpfit |
| Fit Multiple Linear Segments And Their Change Points | mcp |
| Model data columns | mcp_columns |
| Run example models | mcp_example mcp_example_data |
| Model parameters | mcp_pars |
| Model formulas in mcp | mcp-formula mcp_formula |
| Priors in mcp | mcp-priors mcp_priors |
| Class 'mcpfit' of Models Fitted with the 'mcp' Package | mcpfit mcpfit-class |
| Extract Model Information from an 'mcpfit' | family.mcpfit formula.mcpfit model-accessors-mcpfit model.frame.mcpfit nobs.mcpfit |
| Negative Binomial for mcp | negbinomial |
| Plot individual parameters | plot_pars |
| Plot full fits | plot plot.mcpfit plot_dpar |
| Posterior prediction draws for 'mcpfit' objects | posterior_epred posterior_epred.mcpfit posterior_linpred posterior_linpred.mcpfit posterior_predict posterior_predict.mcpfit |
| Prior and Posterior Covariance and Central Intervals for 'mcpfit' Objects | confint.mcpfit posterior-uncertainty-mcpfit vcov.mcpfit |
| Posterior Predictive Checks For Mcpfit Objects | pp_check pp_check.mcpfit |
| Print mcplist | print.mcplist |
| Nice Printing of Multiline Texts | print.mcptext |
| Summarise priors used by an mcp model | prior_summary prior_summary.mcpfit |
| Transform an mcp prior to the parameterization used by JAGS | sd_to_prec |
| Summarise mcpfit objects | coef.mcpfit fixef fixef.mcpfit print print.mcpfit print.mcpsummary ranef ranef.mcpfit summary summary.mcpfit |
