Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 13, 2024
1 parent 4b8a2cd commit ecebb74
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-PROreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,16 @@ test_that("PROreg.BBrm", {
out <- find_parameters(model)
expect_identical(out$conditional, c("Intercept", "x"))
expect_identical(out$random, "z")

out <- get_statistic(model)
expect_equal(out$Statistic, c(2.64613, -5.22177), tolerance = 1e-4)

out <- find_formula(model)
expect_equal(out, list(conditional = y ~ x, random = ~z), ignore_attr = TRUE)

out <- n_obs(model)
expect_identical(out, 100L)

out <- model_info(model)
expect_true(out$is_betabinomial)
})

0 comments on commit ecebb74

Please sign in to comment.