tests/testthat/test-mice.impute.2l.norm.R

context("mice.impute.2l.norm")

d1 <- brandsma[1:200, c("sch", "lpo")]
pred <- make.predictorMatrix(d1)
pred["lpo", "sch"] <- -2

test_that("mice::mice.impute.2l.norm() runs empty model", {
  expect_silent(imp <- mice(d1, method = "2l.norm", print = FALSE, pred = pred, m = 1, maxit = 1))
  expect_false(anyNA(complete(imp)))
})

Try the mice package in your browser

Any scripts or data that you put into this service are public.

mice documentation built on June 7, 2023, 5:38 p.m.