Skip to contents

Fit and show mcpfit

mcp() returns an mcpfit. These functions illuminate what this fit contains structurally.

mcp()
Fit Multiple Linear Segments And Their Change Points
mcp_pars() experimental
Model parameters
mcp_columns() experimental
Model data columns
prior_summary() experimental
Summarise priors used by an mcp model
print(<mcplist>)
Print mcplist
print(<mcptext>)
Nice Printing of Multiline Texts
is.mcpfit() is_mcpfit()
Checks if the Argument is an mcpfit Object
family(<mcpfit>) nobs(<mcpfit>) model.frame(<mcpfit>) formula(<mcpfit>)
Extract Model Information from an mcpfit

Documentation on mcp()

Detailing the model, priors, and R objects

mcp-package
mcp: Regression with Multiple Change Points
mcp-formula mcp_formula
Model formulas in mcp
mcp-priors mcp_priors
Priors in mcp
mcpfit-class mcpfit
Class mcpfit of Models Fitted with the mcp Package

Visual summaries

Plotting of fits, parameters, and diagnostics.

plot(<mcpfit>) plot_dpar()
Plot full fits
plot_pars()
Plot individual parameters
pp_check(<mcpfit>)
Posterior Predictive Checks For Mcpfit Objects
interpolate_newdata() experimental
Returns a tibble with all combos of predictors

Textual summaries and statistics

Summaries that pertain to the whole mcpfit or to specific parameters.

summary(<mcpfit>) print(<mcpsummary>) fixef(<mcpfit>) ranef(<mcpfit>) coef(<mcpfit>) print(<mcpfit>)
Summarise mcpfit objects
vcov(<mcpfit>) confint(<mcpfit>)
Prior and Posterior Covariance and Central Intervals for mcpfit Objects
hypothesis()
Test Hypotheses Concerning Individual Parameters
loo(<mcpfit>) waic(<mcpfit>)
Information Criteria for Model Comparison

Extract draws or data

Per-observation summaries or draws

Families

Distributional families that are not available in base R.

bernoulli()
Bernoulli Family for mcp
negbinomial()
Negative Binomial for mcp

Help and demos

Some showcases of typical mcp analyses. Most of these are discussed on the front page.

mcp_example() mcp_example_data()
Run example models
demo_fit
Pre-fitted example mcp model

Deprecated

Functions retained for backward compatibility.

sd_to_prec() deprecated
Transform an mcp prior to the parameterization used by JAGS