Skip to contents

Combine several fitted univariate frequency analyses (one per families entry, each fit to data by a Bayesian MCMC) into a single composite frequency curve via competing-risks, mixture, or model-averaging aggregation. Wraps the shared C++ CompositeAnalysis.

Usage

composite_analysis(
  data,
  families,
  composite_type = "CompetingRisks",
  average_method = "AIC",
  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 shared by every child analysis.

families

character vector of child distribution family names (one child analysis each).

composite_type

"CompetingRisks" (default), "Mixture", or "ModelAverage".

average_method

model-averaging criterion when composite_type = "ModelAverage": "AIC" (default), "BIC", "DIC", "WAIC", "LOOIC", "Equal", or "RMSE".

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.90 for 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.

Value

A named list: parameters, mode_curve, mean_curve, lower_ci, upper_ci, and the scalars aic, bic, dic, rmse.