tests/testthat/test_EAimp.R

context("EAimp")
library(modi)

test_that("Dimension of imputed data is equal to dimension of input data", {
  data(bushfirem, bushfire.weights)
  invisible(capture.output(det.res <- EAdet(bushfirem, bushfire.weights, plotting = FALSE)))
  invisible(capture.output(imp.res <- EAimp(bushfirem, bushfire.weights,
                                            outind = det.res$outind, kdon = 3)))
  expect_equal(dim(imp.res$imputed.data), dim(bushfirem))
})
martinSter/modi documentation built on March 14, 2023, 12:09 p.m.