Using mcp

Functions for everyday use of mcp.

mcp()

Fit Multiple Linear Segments And Their Change Points

plot(<mcpfit>)

Plot full fits

plot_pars()

Plot individual parameters

pp_check()

Posterior Predictive Checks For Mcpfit Objects

summary(<mcpfit>) fixef() ranef() print(<mcpfit>)

Summarise mcpfit objects

fitted(<mcpfit>)

Expected Values from the Posterior Predictive Distribution

predict(<mcpfit>)

Samples from the Posterior Predictive Distribution

residuals(<mcpfit>)

Compute Residuals From Mcpfit Objects

criterion() loo(<mcpfit>) waic(<mcpfit>)

Compute information criteria for model comparison

hypothesis()

Test hypotheses on mcp objects.

Axillary functions

These are used internally by mcp, but are exposed here since they may be useful for other purposes. Most other useful internal functions deliver the result already in mcp(segments, sample = FALSE), so mcp() will be their API.

sd_to_prec()

Transform a prior from SD to precision.

logit()

Logit function

ilogit()

Inverse logit function

probit()

Probit function

phi()

Inverse probit function

is.mcpfit()

Checks if argument is an mcpfit object

Families

Distributional families that are not available in base R.

bernoulli()

Bernoulli family for mcp

negbinomial()

Negative binomial for mcp

exponential()

Exponential family for mcp

Help and demos

These datasets were simulated with mcp. There are lnks to the simulation scripts in the documentation for each of them. The simulation values will also show up if you fit a model to one of these dataset and call summary(fit). Analyses of most of these are demonstrated on the front page.

mcp_example()

Get example models and data

demo_fit

Example mcpfit for examples

Miscellaneous

Stuff you would not usually consult directly.

mcpfit-class

Class mcpfit of models fitted with the mcp package

print(<mcplist>)

Print mcplist

print(<mcptext>)

Nice printing texts