Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jun 12, 2024
1 parent 406b885 commit e35f0c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/testthat/test-rstanarm.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ skip_if_offline()
skip_if_not_installed("lme4")
skip_if_not_installed("BayesFactor")
skip_if_not_installed("rstanarm")
skip_if_not_installed("httr2")

suppressPackageStartupMessages({
suppressWarnings(suppressMessages(library(rstanarm, quietly = TRUE, warn.conflicts = FALSE)))
Expand Down Expand Up @@ -431,8 +432,8 @@ test_that("get_variance", {
list(
var.fixed = 0.36274,
var.random = 0.5988885,
var.residual = 3.28987,
var.distribution = 3.28987,
var.residual = 0.2188036,
var.distribution = 0.2188036,
var.dispersion = 0,
var.intercept = c(herd = 0.59889)
),
Expand All @@ -448,11 +449,11 @@ test_that("get_variance", {
tolerance = 1e-4
)
expect_equal(get_variance_residual(m1),
c(var.residual = 3.289868),
c(var.residual = 0.2188036),
tolerance = 1e-4
)
expect_equal(get_variance_distribution(m1),
c(var.distribution = 3.289868),
c(var.distribution = 0.2188036),
tolerance = 1e-4
)
expect_equal(get_variance_dispersion(m1),
Expand Down

0 comments on commit e35f0c6

Please sign in to comment.