Skip to contents

The object returned by gmm_impute(). It carries the m completed data matrices, the bootstrap-fitted mixtures behind them (used by the analytic pooling in proxy_pool()), the mixture fitted to the full data, and a record of the missingness. Pass it to gmm_complete() to extract the completed datasets and to proxy_pool() / proxy_fmi() for inference.

Usage

gmm_imputation(
  data = NULL,
  completions = list(),
  fits = list(),
  point_fit = NULL,
  n_components = integer(0),
  m = integer(0),
  mechanism = "mar",
  observed = NULL,
  var_names = character(0),
  is_data_frame = FALSE,
  diagnostics = list(),
  call = NULL
)

Arguments

data

The numeric data matrix supplied to gmm_impute(), with NA for missing entries.

completions

List of m completed data matrices.

fits

List of m bootstrap-fitted gmm objects behind the completions.

point_fit

The gmm fitted to the full data.

n_components

Integer number of mixture components.

m

Integer number of completions.

mechanism

Missingness mechanism (currently "mar").

observed

Logical matrix marking the observed entries.

var_names

Character vector of column names.

is_data_frame

Logical; whether the input was a data frame.

diagnostics

List of fit diagnostics (per-column missing rates, convergence, iterations).

call

The matched call.

Value

An S7 object of class gmm_imputation.

Examples

x1 <- rnorm(60)
x2 <- x1 + rnorm(60, sd = 0.4)
x2[sample(60, 10)] <- NA
imp <- gmm_impute(cbind(x1, x2), N = 1L, m = 10L, seed = 1L)
imp   # an S7 object of class gmm_imputation
#> <gmm_imputation>: m = 10 completions, K = 1 components, p = 2
#>   mechanism  : missing at random
#>   missing    : x1 0%, x2 17%