MixStable0.1.0 package

Parameter Estimation for Stable Distributions and Their Mixtures

aic

Akaike Information Criterion (AIC)

analyse_stable_distribution

Perform full stability analysis and export results

bayesian_mixture_model

Bayesian mixture model using normal components (simplified)

bic

Bayesian Information Criterion (BIC)

build_mcculloch_interpolators

Build interpolation functions from McCulloch table

calculate_log_likelihood

Calculate simplified log-likelihood

CDF

Estimate stable distribution parameters using classical ECF regression

clip

Clip values between lower and upper bounds

compare_em_vs_em_gibbs

Compare standard EM and EM with Gibbs sampling using kernel ECF

compare_estimators_on_simulations

Compare MLE, ECF, and McCulloch estimators on simulated data

compare_methods_across_configs

Compare McCulloch, ECF, and MLE methods across parameter configuration...

compare_methods_with_gibbs

Compare estimation methods with and without Gibbs sampling

compute_model_metrics

Compute log-likelihood, AIC, and BIC for alpha-stable model

compute_quantile_ratios

Compute McCulloch quantile ratios from sample data

compute_serial_interval

Compute serial interval from CSV file

cosine_exp_ralpha

Cosine exponential function

cosine_log_weighted_exp_ralpha

Cosine-log-weighted exponential with r^(-alpha) term

ecf_components

Extract magnitude and phase components from ECF

ecf_empirical

Compute empirical characteristic function

ecf_estimate_all

Estimate all stable parameters from empirical characteristic function

ecf_fn

Empirical Characteristic Function

ecf_regression

Estimate stable parameters using weighted ECF regression

em_alpha_stable

EM algorithm for alpha-stable mixture

em_estimate_stable_from_cdf_with_gibbs

EM algorithm for alpha-stable mixture using CDF-based ECF and Gibbs M-...

em_estimate_stable_from_cdf

EM algorithm for mixture of alpha-stable distributions using CDF-based...

em_estimate_stable_kernel_ecf_with_gibbs

EM algorithm for alpha-stable mixture using kernel ECF and Gibbs M-ste...

em_estimate_stable_kernel_ecf

EM algorithm for mixture of alpha-stable distributions using kernel EC...

em_estimate_stable_recursive_ecf_with_gibbs

EM algorithm for alpha-stable mixture using recursive ECF and Gibbs M-...

em_estimate_stable_recursive_ecf

EM algorithm for mixture of alpha-stable distributions using recursive...

em_estimate_stable_weighted_ols_with_gibbs

EM algorithm for alpha-stable mixture using weighted OLS and Gibbs M-s...

em_estimate_stable_weighted_ols

EM algorithm for mixture of alpha-stable distributions using weighted ...

em_estimation_mixture

EM algorithm for two-component Gaussian mixture

em_fit_alpha_stable_mixture

EM algorithm for two-component alpha-stable mixture using MLE

em_stable_mixture

EM algorithm for alpha-stable mixture using a custom estimator

empirical_r0

Empirical R0 estimation using growth model

ensure_positive_scale

Ensure positive scale parameter

est_r0_ml

Estimate R0 using maximum likelihood

est_r0_mle

MLE estimation of R0 using generation time

estimate_alpha_gamma

Estimate alpha and gamma from ECF modulus

estimate_beta_delta

Estimate beta and delta from ECF phase

estimate_mixture_params

Estimate mixture of two stable distributions

estimate_stable_from_cdf

Estimate stable parameters using CDF-based ECF regression

estimate_stable_kernel_ecf

Estimate stable parameters using kernel-based ECF method

estimate_stable_params

Estimate single stable distribution parameters

estimate_stable_r

Estimate stable parameters using method of moments

estimate_stable_recursive_ecf

Estimate stable parameters using recursive ECF method

estimate_stable_weighted_ols

Estimate stable parameters using weighted OLS on recursive ECF

eta_func

General eta function

eta0

Helper function for eta0 computation

evaluate_estimation_method

Evaluate estimation method using MSE over multiple trials

evaluate_fit

Evaluate fit quality using RMSE and log-likelihood

export_analysis_report

Export analysis report to JSON and Excel

false_position_update

False position method update step

fast_integrate

Fast numerical integration using trapezoidal rule

fit_alpha_stable_mle

Fit Alpha-Stable Distribution using MLE (L-BFGS-B)

fit_mle_mixture

Fit MLE Mixture of Two Stable Distributions

fit_stable_ecf

Estimate stable parameters using filtered and weighted ECF regression

generate_alpha_stable_mixture

Generate samples from a predefined alpha-stable mixture

generate_mcculloch_table

Generate McCulloch lookup table from simulated stable samples

generate_mixture_data

Simulates a mixture of alpha-stable distributions with randomly sample...

generate_synthetic_data

Generate synthetic data from two alpha-stable components

gibbs_sampler

Gibbs sampler for Gaussian mixture model

grad_loglik_alpha

Log-likelihood gradient with respect to alpha

grad_loglik_beta

Log-likelihood gradient with respect to beta

grad_loglik_delta

Log-likelihood gradient with respect to delta (scale)

grad_loglik_omega

Log-likelihood gradient with respect to omega (location)

Im

Imaginary part of the ECF integral

Int_Im

Integrate imaginary component over R\mathbb{R}

Int_Re

Integrate real component over R\mathbb{R}

integrate_cosine_log_weighted

Integrate cosine-log-weighted exponential

integrate_cosine

Integrate cosine exponential

integrate_function

Robust integration helper function

integrate_sine_log_weighted

Integrate sine-log-weighted exponential

integrate_sine_r_weighted

Integrate sine-r-weighted exponential

integrate_sine_weighted

Integration wrappers for specific integrands

integrate_sine

Integrate sin exponential

kde_bandwidth_plugin

KDE bandwidth selection using plugin method

L_stable

Negative log-likelihood for stable distribution using dstable

log_likelihood_mixture

Log-likelihood for mixture of stable distributions

Max_vrai

Maximum likelihood estimation using Nelder-Mead

mcculloch_lookup_estimate

Estimate stable parameters using McCulloch lookup

mcculloch_quantile_init

Initialization using McCulloch quantile method

metropolis_hastings

Metropolis-Hastings MCMC for stable mixture clustering

mixture_stable_pdf

Mixture of two stable PDFs

mle_estimate

Simple MLE estimation with default starting values

mock_gibbs_sampling

Mock Gibbs sampling for alpha-stable mixture estimation

mock_lookup_alpha_beta

Mock lookup for alpha and beta (fallback)

N_epanechnikov

Epanechnikov kernel

N_gaussian

Gaussian kernel

N_uniform

Uniform kernel

negative_log_likelihood

Negative log-likelihood for single stable distribution

normalized_grad_alpha

Normalized gradient for alpha parameter Computes the normalized gradie...

normalized_objective_beta

Normalized objective for beta parameter

normalized_objective_delta

Normalized objective for delta parameter

normalized_objective_omega

Normalized objective for omega parameter

plot_comparison

Compare EM-estimated mixture with a non-optimized reference model

plot_distributions

Plot histogram with normal and stable PDF overlays

plot_effective_reproduction_number

Plot effective reproduction number (Re) over time

plot_final_mixture_fit

Plot final fitted mixture of alpha-stable distributions

plot_fit_vs_true_methods

Compare estimated mixture densities from two methods against the true ...

plot_fit_vs_true

Plot true vs estimated mixture density

plot_method_comparison

Plot RMSE and Log-Likelihood comparison across methods

plot_mixture_fit

Plot mixture fit with individual components

plot_mixture

Plot mixture of two alpha-stable distributions

plot_real_mixture_fit

Plot fitted mixture on real dataset

plot_results

Plot posterior mixture density from MCMC samples

plot_trace

Plot trace of a parameter across MCMC iterations

plot_vs_normal_stable

Plot comparison between normal and stable distributions

qcv_stat

QCV statistic for tail heaviness

r_stable_pdf

Robust stable PDF computation

Re

Real part of the ECF integral

recursive_weight

Recursive weight function

robust_ecf_regression

Estimate stable parameters using robust ECF regression

robust_mle_estimate

Robust MLE estimation with multiple starting points

rstable

Generate random samples from stable distribution

RT

Compute effective reproduction number Rt

run_all_estimations

Run all EM-based estimations without Gibbs sampling (CRAN-safe)

run_estimations_with_gibbs

Run all EM-based estimations with Gibbs sampling (CRAN-safe)

safe_integrate

Safe integration wrapper with multiple fallback strategies

simple_em_real

Simple 2-component EM using ECF initialization

simulate_mixture

Simulate mixture data from alpha-stable components

sine_exp_ralpha

Sine exponential function

sine_log_weighted_exp_ralpha

Sine-log-weighted exponential with r^(-alpha) term

sine_r_weighted_exp_ralpha

Sine-r-weighted exponential function

sine_weighted_exp_ralpha

Sine-weighted exponential with r^alpha term

skew_kurtosis

Calculate skewness and kurtosis

stable_fit_init

Initialize stable distribution parameters

test_normality

Test normality using multiple statistical tests

unpack_params

Helper function to unpack parameters

validate_params

Validate and clip parameters for stable distribution

wasserstein_distance_mixture

Wasserstein distance between two mixture distributions

Provides various functions for parameter estimation of one-dimensional stable distributions and their mixtures. It implements a diverse set of estimation methods, including quantile-based approaches, regression methods based on the empirical characteristic function (empirical, kernel, and recursive), and maximum likelihood estimation. For mixture models, it provides stochastic expectation–maximization (SEM) algorithms and Bayesian estimation methods using sampling and importance sampling to overcome the long burn-in period of Markov Chain Monte Carlo (MCMC) strategies. The package also includes tools and statistical tests for analyzing whether a dataset follows a stable distribution. Some of the implemented methods are described in Hajjaji, O., Manou-Abi, S. M., and Slaoui, Y. (2024) <doi:10.1080/02664763.2024.2434627>.

  • Maintainer: Solym Manou-Abi
  • License: GPL-3
  • Last published: 2025-11-03