Skip to contents

Convenience wrapper around fit_gau with na_action = "em" to provide a parallel entry point to em_inad.

Usage

em_gau(
  y,
  order = 1,
  blocks = NULL,
  estimate_mu = TRUE,
  max_iter = 100,
  tol = 1e-06,
  verbose = FALSE,
  ...
)

Arguments

y

Numeric matrix (n_subjects x n_time), may contain NA.

order

Integer 0, 1, or 2.

blocks

Optional vector of block membership (length n_subjects).

estimate_mu

Logical, whether to estimate mu (default TRUE).

max_iter

Maximum EM iterations.

tol

EM convergence tolerance.

verbose

Logical, print EM progress.

...

Additional arguments passed to fit_gau.

Value

An gau_fit object as returned by fit_gau.

Details

This is an alias-style helper for users who prefer explicit em_* entry points across model families.

Examples

set.seed(1)
y <- simulate_gau(n_subjects = 35, n_time = 5, order = 1, phi = 0.3)
y[sample(length(y), 8)] <- NA
fit <- em_gau(y, order = 1, max_iter = 20, tol = 1e-5)
fit$settings$na_action
#> NULL