Nothing
test_that("jsd auto-detects continuous data", {
set.seed(1)
x <- rnorm(100)
y <- rnorm(100, 0.5)
res <- jsd(x, y, type = "auto")
expect_s3_class(res, "jsd_estimate")
expect_equal(res$type, "continuous")
})
test_that("jsd auto-detects discrete ordinal-like data", {
set.seed(1)
x <- sample(0:4, 120, replace = TRUE)
y <- sample(0:4, 100, replace = TRUE)
res <- jsd(x, y, type = "auto")
expect_s3_class(res, "jsd_estimate")
expect_equal(res$type, "discrete")
})
test_that("jsd_ci returns expected summary fields", {
set.seed(1)
x <- rnorm(80)
y <- rnorm(100, 0.5)
res <- jsd_ci(x, y, B = 50, seed = 1)
expect_s3_class(res, "jsd_ci")
expect_true(res$type %in% c("continuous", "discrete"))
expect_true(is.finite(res$estimate))
expect_length(res$conf_int, 2)
expect_true(is.finite(res$boot_se))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.