Skip to content

Commit

Permalink
fix autothinning test
Browse files Browse the repository at this point in the history
  • Loading branch information
n-kall committed Jan 10, 2024
1 parent 8d8ae7d commit c81850b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-thin_draws.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ test_that("automatic thinning works as expected", {

ess_mu_1 <- SW(min(ess_tail(mu_1), ess_bulk(mu_1)))
ess_mu_2 <- SW(min(ess_tail(mu_2), ess_bulk(mu_2)))
ess_mu_3 <- SW(min(ess_tail(mu_2), ess_bulk(mu_3)))
ess_mu_4 <- SW(min(ess_tail(mu_3), ess_bulk(mu_4)))
ess_mu_3 <- SW(min(ess_tail(mu_3), ess_bulk(mu_3)))
ess_mu_4 <- SW(min(ess_tail(mu_4), ess_bulk(mu_4)))

thin_by <- round(niterations(mu) / mean(
thin_by <- niterations(mu) / mean(
c(ess_mu_1, ess_mu_2, ess_mu_3, ess_mu_4))
)

expect_equal(thin_draws(mu), thin_draws(mu, thin = thin_by))

})

0 comments on commit c81850b

Please sign in to comment.