An extensible expectation-maximization (EM) framework for finite
    mixtures of quantile regressions (clusterwise / mixture-of-experts quantile
    regression). A single EM substrate with an engine/extension contract carries
    a family of capabilities: the core free-weight mixture of Wu and Yao (2016)
    <doi:10.1016/j.csda.2014.04.014> -- a fast asymmetric-Laplace path and the
    nonparametric kernel-density EM with components constrained to have their
    tau-quantile equal to zero (Hall and Presnell 1999 device); expectile and
    M-quantile component-loss families (Newey and Powell 1987; Breckling and
    Chambers 1988); component-specific penalized variable selection (SCAD /
    adaptive-LASSO, the quantile analogue of Khalili and Chen 2007); and joint
    multi-quantile estimation with a shared latent classification and
    non-crossing component curves. Provides classification-aware standard errors
    (sparsity and stochastic-EM multiple imputation), multi-start estimation,
    component-count selection, and prediction. The companion package 'mixqrgate'
    adds location-varying gating.

Extends finite mixtures of quantile regressions (the 'mixqr' package)
    with a concomitant-covariate, quantile-indexed mixing gate. The mixing
    probabilities follow a multinomial-logit model whose coefficients may depend
    on a separate set of gating covariates and on the quantile level, so that
    latent-class membership can change across the conditional distribution. This
    turns the location-varying mixing idea of Furno (2025) into a likelihood and
    EM object with proper standard errors on the gate. Estimation reuses the
    'mixqr' component and error-density machinery; the gate is fit by a weighted
    multinomial-logistic M-step and reduces exactly to a constant gate when the
    gating model is an intercept only.

Performs maximum likelihood estimation for finite mixture models for families including Normal, Weibull, Gamma and Lognormal by using EM algorithm, together with Newton-Raphson algorithm or bisection method when necessary. It also conducts mixture model selection by using information criteria or bootstrap likelihood ratio test. The data used for mixture model fitting can be raw data or binned data. The model fitting process is accelerated by using R package 'Rcpp'.