tests/testthat/test_Winsimp.R

context("Winsorization and Imputation")
library(modi)

test_that("Dimension of input data is equal to dimension of output data", {
  data(bushfirem, bushfire.weights)
  invisible(capture.output(det.res <- TRC(bushfirem, weight = bushfire.weights)))
  imp.res <- Winsimp(bushfirem, det.res$center, det.res$scatter, det.res$outind)
  expect_equal(dim(bushfirem), dim(imp.res$imputed.data))
})

Try the modi package in your browser

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

modi documentation built on March 31, 2023, 8:35 p.m.