tests/testthat/test_simulation_settings.R

test_that("simulate_data works in simulated settings", {
  n <- 5
  for (ex in c("normal", "mixture2", "mixture3", "logistic", "t4")){
    for (f in c("plm", "additive", "interaction")){
      out <- simulate_data(n, ex, f)
      expect_vector(out$y, size=n)
      expect_vector(out$x, size=n)
      expect_equal(nrow(out$z), n)
    }
  }
})

Try the drape package in your browser

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

drape documentation built on April 3, 2025, 9:23 p.m.