Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions tests/testthat/test_samplers.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
test_that("test sampling", {

test_that('test sampling',{

set.seed(123123)
dqrng::dqRNGkind("Xoroshiro128+")
dqrng::dqset.seed(123123)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the above lines are necessary. I had included them in my reprex in order to be sure that the difference in confidence intervals is larger than 0.005. However, I think it is in principle a good idea to run this kind of tests w/o fixing the seed or RNG.


data1 <<- fwildclusterboot:::create_data(
N = 10000,
N_G1 = 20,
Expand Down Expand Up @@ -32,6 +36,8 @@ test_that("test sampling", {
)

expect_equal(pval(boot1), pval(boot2), tolerance = 0.05)
expect_equal(teststat(boot1), teststat(boot2))
expect_equal(confint(boot1), confint(boot2), tolerance = 0.005)
expect_equal(teststat(boot1), teststat(boot2), tolerance = 0.005)
expect_equal(confint(boot1), confint(boot2), tolerance = 0.075)

})