Extract completed datasets from a gmm_imputation
Arguments
Value
When which selects one completion, a single completed dataset
(matrix, or data frame if the input was one); otherwise a list of them.
See also
Other imputation:
as_mids(),
gmm_imputation(),
gmm_impute(),
mechanism,
proxy_fmi(),
proxy_mnar_sensitivity(),
proxy_pool()
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)
first <- gmm_complete(imp, which = 1L) # one completed dataset
anyNA(first)
#> [1] FALSE
all_completions <- gmm_complete(imp, which = "all") # a list of ten
length(all_completions)
#> [1] 10