Skip to contents

Fit a copula over two fixed univariate marginals with a Bayesian MCMC and return the AND-joint-exceedance mode/mean curve + credible band across an XY ordinate grid. Wraps the shared C++ BivariateAnalysis.

Usage

bivariate_analysis(
  marginal_x_family,
  marginal_x_data,
  marginal_x_parameters,
  marginal_y_family,
  marginal_y_data,
  marginal_y_parameters,
  xy_x,
  xy_y,
  copula = "Normal",
  estimation_method = "InferenceFromMargins",
  sampler = "DEMCz",
  iterations = 3000L,
  output_length = 10000L,
  credible_level = 0.9,
  seed = 12345L,
  number_of_chains = 4L,
  thinning_interval = -1L
)

Arguments

marginal_x_family, marginal_y_family

marginal distribution family names.

marginal_x_data, marginal_y_data

numeric vectors of the marginal samples.

marginal_x_parameters, marginal_y_parameters

numeric fixed marginal parameter vectors.

xy_x, xy_y

numeric vectors of the (x, y) ordinate grid at which to evaluate the joint curve.

copula

copula family name (e.g. "Normal", "Clayton", "Gumbel").

estimation_method

copula estimation method (default "InferenceFromMargins").

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).

number_of_chains

number of MCMC chains (default 4).

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 (one curve entry per XY ordinate).