Skip to contents

A 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 m responsibility matrix p whose rows sum to 1.

mstep_pi(p, weights)

returns a length-m mixing-probability vector.

mstep_beta(p, X, y, tau, weights, beta_prev)

returns a (ncol(X)) x m coefficient matrix (weighted quantile regression).

update_density(p, X, y, beta, tau, control)

returns a length-m list of density objects, each a list with at least eval (a function), f0 (density at 0) and type.

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.