Refit DeCovarT from several random starts to probe multimodality
Source:R/03_06_decovart_inference.R
multistart_decovart.RdThe realised DeCovarT log-likelihood is not globally concave, so a successful convergence code, a small relative-distance-to-minimum and a negative-definite local Hessian together establish a local maximum only. Refitting from independent Dirichlet\((1,\ldots,1)\) starts and comparing the attained log-likelihoods is the cheapest direct probe of a second, equally good or better mode.
Usage
multistart_decovart(
y,
mean_signature_matrix,
Sigma,
n_starts = 5L,
solver = deconvolute_ratios_Marquardt_Levenberg,
loglik_tol = 1e-04,
dirichlet_alpha = 1,
...
)Arguments
- y
Numeric vector (or one-column matrix) \(\boldsymbol{y}\in\mathbb{R}^{G}\).
- mean_signature_matrix
Numeric matrix \(\boldsymbol{\mu}\in\mathcal{M}_{G\times J}\) (plug-in means).
- Sigma
Array of cell-type covariances in \(\mathcal{M}_{G\times G\times J}\).
- n_starts
Number of Dirichlet restarts (in addition to the equi-balanced start).
- solver
Solver accepting
initial_pandreturn_model; defaults todeconvolute_ratios_Marquardt_Levenberg().- loglik_tol
Two starts count as reaching the same mode when their log-likelihoods differ by less than this amount.
- dirichlet_alpha
Concentration for those random starts (default
1). Seestarting_simplex().- ...
Passed to
solver(e.g.epsilon,itmax).
Value
A list with coefficients (best fit), loglik,
loglik_range, starts (matrix of per-start estimates),
logliks, and multimodal.