Skip to contents

Runs the engine-certified parametric-bootstrap likelihood-ratio test between two nested ML-fitted LMMs through the Rust mm_bootstrap_lrt_json entry point. The smaller model (fewer estimated parameters) is the reduced model; the larger is the alternative. The returned object carries the engine's replicate accounting (successful and completed replicates, boundary count, Monte-Carlo standard error, seed) rather than a bare mean() p-value, so every reported number traces back to a versioned Rust payload.

Usage

parametric_bootstrap(
  null,
  alternative,
  nsim = 100L,
  seed = NULL,
  threads = 1L,
  ...
)

Arguments

null, alternative

Fitted mm_lmm objects. Order is irrelevant; the model with fewer parameters is treated as the reduced model.

nsim

Number of bootstrap replicates.

seed

Optional bootstrap seed.

threads

Worker threads for the replicate refits (default 1). The responses are simulated serially and each replicate refits fresh copies of both models, so the result is identical for every value; see bootstrap_control() for the threading contract.

...

Reserved for future methods.

Value

An mm_parametric_bootstrap object.

Details

The engine refuses REML fits: refit with lmm(..., REML = FALSE) before calling. (compare(method = "bootstrap") refits REML to ML automatically.)