Skip to contents

Reports the per-node imputation models drm_sem() built from the DAG when called with impute = "auto". Each row is one (node, parent) pair: the incomplete endogenous parent was imputed from that parent's own node model. A node with two incomplete Gaussian parents yields two rows. Uncertainty columns come from the engine's imputed() table and must be read via uncertainty_status, never via is.na(std_error) — those semantics differ between drmTMB 0.6.0 and 0.7.0. This is not full-information maximum likelihood across the SEM.

Usage

imputation(object, ...)

# S3 method for class 'drm_sem'
imputation(object, ...)

Arguments

object

A drm_sem object.

...

Unused.

Value

A data frame with columns node, variable, model, family, n_missing, uncertainty_status, and std_error_usable, with zero rows when no imputation was derived. std_error_usable is TRUE only when every missing row has uncertainty_status == "ok" and a finite standard error.

Examples

if (FALSE) { # \dontrun{
sem <- drm_sem(
  m = drm_node(drmTMB::bf(m ~ x)),
  y = drm_node(drmTMB::bf(y ~ m + x)),
  data = dat, impute = "auto"
)
imputation(sem)
} # }