test_random_effect() exposes the boundary-aware likelihood-ratio route for
random-effect variance components. The v1 certified route is a nested ML
comparison that adds exactly one variance parameter and reports the
Self-Liang 50:50 mixture reference distribution; a comparison that adds
only correlation parameters (e.g. || versus |) is referred to the
ordinary chi-square, since a zero correlation is interior to the
parameter space (method = "boundary_lrt_ordinary_chisq"). It is intentionally
separate from test_effect(), which tests fixed effects.
Arguments
- fit
A fitted
mm_lmm.- term
Random-effect term to test. This can be the term id (
"r0"), the original random-effect fragment such as"(1 | subject)", or a unique grouping factor name such as"subject".- method
Currently
"boundary_lrt".- refit_for_comparison
How to handle REML fits.
"auto"and"ml"refit to ML;"error"refuses.- ...
Reserved for future methods.