The frozen mixqr engine contract (documentation only)
Source:R/engines_registry.R
mixqr_engine_contract.RdA mixqr_engine is a list of closures with these signatures. The generic
driver mixqr_em() owns convergence, multi-start, labelling and bookkeeping;
engines supply only the statistical updates.
Details
estep(state, X, y, tau, weights)returns an
n x mresponsibility matrixpwhose rows sum to 1.mstep_pi(p, weights)returns a length-
mmixing-probability vector.mstep_beta(p, X, y, tau, weights, beta_prev)returns a
(ncol(X)) x mcoefficient matrix (weighted quantile regression).update_density(p, X, y, beta, tau, control)returns a length-
mlist of density objects, each a list with at leasteval(a function),f0(density at 0) andtype.loglik(state, X, y, tau)returns the log-likelihood or
NA.npar(state)returns the number of free parameters.
state is a list with elements pi, beta, density, tau, m,
error_density.