Fit a finite mixture of 1-3 component distributions to a sample with a Bayesian MCMC analysis
and return the frequency (quantile) curve, credible band, and goodness-of-fit scalars. Wraps the
shared C++ MixtureAnalysis.
Usage
mixture_analysis(
data,
families,
zero_inflated = FALSE,
sampler = "DEMCz",
iterations = 3000L,
output_length = 10000L,
credible_level = 0.9,
seed = 12345L,
exceedance_probabilities = NULL,
thinning_interval = -1L
)Arguments
- data
numeric vector of observations.
- families
character vector of component distribution family names (e.g.
c("Normal", "Normal")).- zero_inflated
logical; add a zero-inflation component (default
FALSE).- sampler
MCMC sampler:
"DEMCz"(default),"DEMCzs","ARWMH", or"NUTS".- iterations
number of post-warmup MCMC iterations.
- output_length
number of posterior samples used to build the credible band.
- credible_level
credible-interval width (e.g.
0.90for a 90% band).- seed
PRNG seed for the sampler (fixed for reproducibility).
- exceedance_probabilities
optional numeric vector of exceedance probabilities at which to tabulate the curve; when
NULL, the 25 standard default ordinates are used.- thinning_interval
MCMC thinning interval;
-1(default) keeps the sampler's own default.