Package: MixStable 0.1.0

Solym Manou-Abi

MixStable: Parameter Estimation for Stable Distributions and Their Mixtures

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

Authors:Solym Manou-Abi [aut, cre], Adam Najib [aut], Yousri Slaoui [aut]

MixStable_0.1.0.tar.gz
MixStable_0.1.0.zip(r-4.7-any)MixStable_0.1.0.zip(r-4.6-any)
MixStable_0.1.0.tar.gz(r-4.7-any)MixStable_0.1.0.tar.gz(r-4.6-any)
MixStable_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
MixStable/json (API)

# Install 'MixStable' in R:
install.packages('MixStable', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.00 score 259 downloads 118 exports 81 dependencies

Last updated from:d869cc7ba6. Checks:2 NOTE, 4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develNOTE290
source / vignettesOK205
linux-releaseOK266
windows-develNOTE323
windows-releaseOK213
wasm-releaseOK123

Exports:aicanalyse_stable_distributionbayesian_mixture_modelbicbuild_mcculloch_interpolatorscalculate_log_likelihoodCDFclipcompare_em_vs_em_gibbscompare_estimators_on_simulationscompare_methods_across_configscompare_methods_with_gibbscompute_model_metricscompute_quantile_ratioscompute_serial_intervalcosine_exp_ralphacosine_log_weighted_exp_ralphaecf_componentsecf_empiricalecf_estimate_allecf_fnecf_regressionem_alpha_stableem_estimate_stable_from_cdfem_estimate_stable_from_cdf_with_gibbsem_estimate_stable_kernel_ecfem_estimate_stable_kernel_ecf_with_gibbsem_estimate_stable_recursive_ecfem_estimate_stable_recursive_ecf_with_gibbsem_estimate_stable_weighted_olsem_estimate_stable_weighted_ols_with_gibbsem_estimation_mixtureem_fit_alpha_stable_mixtureem_stable_mixtureempirical_r0ensure_positive_scaleest_r0_mlest_r0_mleestimate_alpha_gammaestimate_beta_deltaestimate_mixture_paramsestimate_stable_from_cdfestimate_stable_kernel_ecfestimate_stable_paramsestimate_stable_restimate_stable_recursive_ecfestimate_stable_weighted_olsevaluate_estimation_methodevaluate_fitexport_analysis_reportfalse_position_updatefit_alpha_stable_mlefit_mle_mixturefit_stable_ecfgenerate_alpha_stable_mixturegenerate_mcculloch_tablegenerate_mixture_datagenerate_synthetic_datagibbs_samplergrad_loglik_alphagrad_loglik_betagrad_loglik_deltagrad_loglik_omegaInt_ImInt_Reintegrate_cosineintegrate_cosine_log_weightedintegrate_functionintegrate_sineintegrate_sine_log_weightedintegrate_sine_r_weightedintegrate_sine_weightedkde_bandwidth_pluginL_stablelog_likelihood_mixtureMax_vraimcculloch_lookup_estimatemcculloch_quantile_initmetropolis_hastingsmixture_stable_pdfmle_estimatemock_gibbs_samplingmock_lookup_alpha_betanegative_log_likelihoodplot_comparisonplot_distributionsplot_effective_reproduction_numberplot_final_mixture_fitplot_fit_vs_trueplot_fit_vs_true_methodsplot_method_comparisonplot_mixtureplot_mixture_fitplot_real_mixture_fitplot_resultsplot_traceplot_vs_normal_stableqcv_statr_stable_pdfrobust_ecf_regressionrobust_mle_estimaterstableRTrun_all_estimationsrun_estimations_with_gibbssafe_integratesimple_em_realsimulate_mixturesine_exp_ralphasine_log_weighted_exp_ralphasine_r_weighted_exp_ralphasine_weighted_exp_ralphaskew_kurtosisstable_fit_inittest_normalityunpack_paramsvalidate_paramswasserstein_distance_mixture

Dependencies:askpassbase64encbslibcachemclassclicpp11crosstalkcurldata.tabledigestdplyre1071evaluatefarverfastmapfontawesomefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetshttrisobandjquerylibjsonlitekernlabknitrlabelinglaterlatticelazyevallibstable4ulifecyclemagrittrMASSMatrixmemoisemimemixtoolsnlmenortestopensslopenxlsxotelpillarpkgconfigplotlypromisesproxypurrrR6rappdirsRColorBrewerRcppRcppGSLrlangrmarkdownS7sassscalessegmentedstablediststringistringrsurvivalsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunyamlzip

Readme and manuals

Help Manual

Help pageTopics
Akaike Information Criterion (AIC)aic
Perform full stability analysis and export resultsanalyse_stable_distribution
Bayesian mixture model using normal components (simplified)bayesian_mixture_model
Bayesian Information Criterion (BIC)bic
Build interpolation functions from McCulloch tablebuild_mcculloch_interpolators
Calculate simplified log-likelihoodcalculate_log_likelihood
Estimate stable distribution parameters using classical ECF regressionCDF
Clip values between lower and upper boundsclip
Compare standard EM and EM with Gibbs sampling using kernel ECFcompare_em_vs_em_gibbs
Compare MLE, ECF, and McCulloch estimators on simulated datacompare_estimators_on_simulations
Compare McCulloch, ECF, and MLE methods across parameter configurationscompare_methods_across_configs
Compare estimation methods with and without Gibbs samplingcompare_methods_with_gibbs
Compute log-likelihood, AIC, and BIC for alpha-stable modelcompute_model_metrics
Compute McCulloch quantile ratios from sample datacompute_quantile_ratios
Compute serial interval from CSV filecompute_serial_interval
Cosine exponential functioncosine_exp_ralpha
Cosine-log-weighted exponential with r^(-alpha) termcosine_log_weighted_exp_ralpha
Example serial interval dataDONNEE_with_serial_interval
Extract magnitude and phase components from ECFecf_components
Compute empirical characteristic functionecf_empirical
Estimate all stable parameters from empirical characteristic functionecf_estimate_all
Empirical Characteristic Functionecf_fn
Estimate stable parameters using weighted ECF regressionecf_regression
EM algorithm for alpha-stable mixtureem_alpha_stable
EM algorithm for mixture of alpha-stable distributions using CDF-based ECFem_estimate_stable_from_cdf
EM algorithm for alpha-stable mixture using CDF-based ECF and Gibbs M-stepem_estimate_stable_from_cdf_with_gibbs
EM algorithm for mixture of alpha-stable distributions using kernel ECFem_estimate_stable_kernel_ecf
EM algorithm for alpha-stable mixture using kernel ECF and Gibbs M-stepem_estimate_stable_kernel_ecf_with_gibbs
EM algorithm for mixture of alpha-stable distributions using recursive ECFem_estimate_stable_recursive_ecf
EM algorithm for alpha-stable mixture using recursive ECF and Gibbs M-stepem_estimate_stable_recursive_ecf_with_gibbs
EM algorithm for mixture of alpha-stable distributions using weighted OLSem_estimate_stable_weighted_ols
EM algorithm for alpha-stable mixture using weighted OLS and Gibbs M-stepem_estimate_stable_weighted_ols_with_gibbs
EM algorithm for two-component Gaussian mixtureem_estimation_mixture
EM algorithm for two-component alpha-stable mixture using MLEem_fit_alpha_stable_mixture
EM algorithm for alpha-stable mixture using a custom estimatorem_stable_mixture
Empirical R0 estimation using growth modelempirical_r0
Ensure positive scale parameterensure_positive_scale
Estimate R0 using maximum likelihoodest_r0_ml
MLE estimation of R0 using generation timeest_r0_mle
Estimate alpha and gamma from ECF modulusestimate_alpha_gamma
Estimate beta and delta from ECF phaseestimate_beta_delta
Estimate mixture of two stable distributionsestimate_mixture_params
Estimate stable parameters using CDF-based ECF regressionestimate_stable_from_cdf
Estimate stable parameters using kernel-based ECF methodestimate_stable_kernel_ecf
Estimate single stable distribution parametersestimate_stable_params
Estimate stable parameters using method of momentsestimate_stable_r
Estimate stable parameters using recursive ECF methodestimate_stable_recursive_ecf
Estimate stable parameters using weighted OLS on recursive ECFestimate_stable_weighted_ols
General eta functioneta_func
Helper function for eta0 computationeta0
Evaluate estimation method using MSE over multiple trialsevaluate_estimation_method
Evaluate fit quality using RMSE and log-likelihoodevaluate_fit
Export analysis report to JSON and Excelexport_analysis_report
False position method update stepfalse_position_update
Fast numerical integration using trapezoidal rulefast_integrate
Fit Alpha-Stable Distribution using MLE (L-BFGS-B)fit_alpha_stable_mle
Fit MLE Mixture of Two Stable Distributionsfit_mle_mixture
Estimate stable parameters using filtered and weighted ECF regressionfit_stable_ecf
Generate samples from a predefined alpha-stable mixturegenerate_alpha_stable_mixture
Generate McCulloch lookup table from simulated stable samplesgenerate_mcculloch_table
Simulates a mixture of alpha-stable distributions with randomly sampled parameters.generate_mixture_data
Generate synthetic data from two alpha-stable componentsgenerate_synthetic_data
Gibbs sampler for Gaussian mixture modelgibbs_sampler
Log-likelihood gradient with respect to alphagrad_loglik_alpha
Log-likelihood gradient with respect to betagrad_loglik_beta
Log-likelihood gradient with respect to delta (scale)grad_loglik_delta
Log-likelihood gradient with respect to omega (location)grad_loglik_omega
Imaginary part of the ECF integralIm
Integrate imaginary component over \mathbb{R}Int_Im
Integrate real component over \mathbb{R}Int_Re
Integrate cosine exponentialintegrate_cosine
Integrate cosine-log-weighted exponentialintegrate_cosine_log_weighted
Robust integration helper functionintegrate_function
Integrate sin exponentialintegrate_sine
Integrate sine-log-weighted exponentialintegrate_sine_log_weighted
Integrate sine-r-weighted exponentialintegrate_sine_r_weighted
Integration wrappers for specific integrandsintegrate_sine_weighted
KDE bandwidth selection using plugin methodkde_bandwidth_plugin
Negative log-likelihood for stable distribution using dstableL_stable
Log-likelihood for mixture of stable distributionslog_likelihood_mixture
Maximum likelihood estimation using Nelder-MeadMax_vrai
Estimate stable parameters using McCulloch lookupmcculloch_lookup_estimate
Initialization using McCulloch quantile methodmcculloch_quantile_init
Metropolis-Hastings MCMC for stable mixture clusteringmetropolis_hastings
Mixture of two stable PDFsmixture_stable_pdf
Simple MLE estimation with default starting valuesmle_estimate
Mock Gibbs sampling for alpha-stable mixture estimationmock_gibbs_sampling
Mock lookup for alpha and beta (fallback)mock_lookup_alpha_beta
Epanechnikov kernelN_epanechnikov
Gaussian kernelN_gaussian
Uniform kernelN_uniform
Negative log-likelihood for single stable distributionnegative_log_likelihood
Normalized gradient for alpha parameter Computes the normalized gradient of the log-likelihood with respect to the alpha parameter over a set of observations. This is useful for optimization routines where scale-invariant updates are preferred.normalized_grad_alpha
Normalized objective for beta parameternormalized_objective_beta
Normalized objective for delta parameternormalized_objective_delta
Normalized objective for omega parameternormalized_objective_omega
Compare EM-estimated mixture with a non-optimized reference modelplot_comparison
Plot histogram with normal and stable PDF overlaysplot_distributions
Plot effective reproduction number (Re) over timeplot_effective_reproduction_number
Plot final fitted mixture of alpha-stable distributionsplot_final_mixture_fit
Plot true vs estimated mixture densityplot_fit_vs_true
Compare estimated mixture densities from two methods against the true densityplot_fit_vs_true_methods
Plot RMSE and Log-Likelihood comparison across methodsplot_method_comparison
Plot mixture of two alpha-stable distributionsplot_mixture
Plot mixture fit with individual componentsplot_mixture_fit
Plot fitted mixture on real datasetplot_real_mixture_fit
Plot posterior mixture density from MCMC samplesplot_results
Plot trace of a parameter across MCMC iterationsplot_trace
Plot comparison between normal and stable distributionsplot_vs_normal_stable
QCV statistic for tail heavinessqcv_stat
Robust stable PDF computationr_stable_pdf
Real part of the ECF integralRe
Recursive weight functionrecursive_weight
Estimate stable parameters using robust ECF regressionrobust_ecf_regression
Robust MLE estimation with multiple starting pointsrobust_mle_estimate
Generate random samples from stable distributionrstable
Compute effective reproduction number RtRT
Run all EM-based estimations without Gibbs sampling (CRAN-safe)run_all_estimations
Run all EM-based estimations with Gibbs sampling (CRAN-safe)run_estimations_with_gibbs
Safe integration wrapper with multiple fallback strategiessafe_integrate
Simple 2-component EM using ECF initializationsimple_em_real
Simulate mixture data from alpha-stable componentssimulate_mixture
Sine exponential functionsine_exp_ralpha
Sine-log-weighted exponential with r^(-alpha) termsine_log_weighted_exp_ralpha
Sine-r-weighted exponential functionsine_r_weighted_exp_ralpha
Sine-weighted exponential with r^alpha termsine_weighted_exp_ralpha
Calculate skewness and kurtosisskew_kurtosis
Initialize stable distribution parametersstable_fit_init
Example transmission pair data with mean serial intervalTableS2_serial_interval_mean_
Test normality using multiple statistical teststest_normality
Helper function to unpack parametersunpack_params
Validate and clip parameters for stable distributionvalidate_params
Wasserstein distance between two mixture distributionswasserstein_distance_mixture