| rlmer_ransac | R Documentation |
Fit rlmer with a RANSAC-derived initial estimator.
rlmer_ransac(
formula,
data,
K = 200L,
sub_frac = 0.5,
n_starts = 1L,
phony_threshold = 0.99,
seed = NULL,
max_tries = 5L,
...
)
formula, data |
passed to |
K, sub_frac, seed |
passed to |
n_starts |
number of distinct RANSAC starts for the multi-start consensus (default 1 = single best start, the previous behaviour). |
phony_threshold |
a fit is treated as phony (non-interior) when
its maximum |
max_tries |
maximum number of RANSAC re-seeds when a redescending
|
... |
other arguments to |
Convenience wrapper that calls ransac_lme4 to obtain
a starting value and then passes it to rlmer's
init argument.
With n_starts > 1 it runs a multi-start consensus:
rlmer is fitted from each of the n_starts best distinct
RANSAC candidate starts, and the returned fit is the
lowest-residual-scale one whose random-effects covariance is interior
(|\hat\rho| \le phony_threshold). This samples several
basins of a redescending \psi and so recovers the interior
solution when the single best start happens to fall into the phony
|\hat\rho| \to 1 attractor. If every start lands phony, the
best-scoring fit is returned with a warning. The per-start summary is
attached as attr(fit, "consensus").
The nonsingular subsample guarantees a full-rank fixed-effects design
at the start only; a redescending \psi can zero-weight
observations during the refinement and collapse the positive-weight
design to rank-deficiency (Koller and Stahel 2017, Remark 2). After the
fit converges its e-side robustness weights are inspected and a warning
is issued if the design restricted to the positively-weighted
observations is rank-deficient, suggesting a positive-weight
\psi (e.g. rho.e = smoothPsi) or a different start.
rlmerMod object.
fit <- rlmer_ransac(Reaction ~ Days + (Days | Subject),
data = sleepstudy, K = 30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.