univariate_analysis

univariate_analysis(
    data,
    distribution,
    sampler='DEMCz',
    iterations=3000,
    output_length=10000,
    credible_level=0.9,
    seed=12345,
    exceedance_probabilities=None,
    thinning_interval=-1,
)

Bayesian univariate frequency analysis.

Fit distribution to data with a Bayesian MCMC analysis and return the frequency (quantile) curve, the posterior mean and credible band, and goodness-of-fit scalars. The MCMC warmup (burn-in) length is set automatically to max(50, iterations // 2) and is not a user parameter.

Parameters

Name Type Description Default
data array_like Observations to fit. required
distribution str Distribution family name. required
sampler ('DEMCz', 'DEMCzs', 'ARWMH', 'NUTS') MCMC sampler. "DEMCz"
iterations int Number of post-warmup MCMC iterations. 3000
output_length int Number of posterior samples used to build the credible band. 10000
credible_level float Credible-interval width (e.g. 0.90 for a 90% band). 0.90
seed int PRNG seed for the sampler. 12345
exceedance_probabilities array_like of float Exceedance probabilities at which to tabulate the curve; when None, the default ordinates are used. None
thinning_interval int MCMC thinning interval; -1 keeps the sampler’s own default. -1

Returns

Name Type Description
dict Keys parameters, mode_curve, mean_curve, lower_ci, upper_ci (one value per exceedance ordinate) and the scalars aic, bic, dic, rmse.