tests/testthat/test-abtest.R

test_that("Basic AB Tests work", {
  data <- create_data_buy(obs = 100)
  expect_s3_class(abtest(data, female_ind == 1, target = buy), class = "ggplot")  # chi2 test
  expect_s3_class(abtest(data, city_ind == 1, target = age, sign_level = 0.01), class = "ggplot")    # t test
})

Try the explore package in your browser

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

explore documentation built on Oct. 11, 2023, 9:07 a.m.