Skip to content

Commit

Permalink
Update test-different_models.R
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 2, 2023
1 parent 6e9dfb1 commit ef7b1d4
Showing 1 changed file with 38 additions and 11 deletions.
49 changes: 38 additions & 11 deletions tests/testthat/test-different_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,64 @@ test_that("insight::get_predicted", {
)
)

rez <- point_estimate(x)
rez <- point_estimate(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 4L))

rez <- hdi(x)
rez <- point_estimate(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 3L))

rez <- hdi(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 4L))

rez <- eti(x)
rez <- hdi(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 3L))

rez <- eti(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 4L))

rez <- ci(x)
rez <- eti(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 3L))

rez <- ci(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 4L))

rez <- map_estimate(x)
rez <- ci(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 3L))

rez <- map_estimate(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 2L))

rez <- p_direction(x)
rez <- map_estimate(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 2L))

rez <- p_direction(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 2L))

rez <- p_map(x)
rez <- p_direction(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 2L))

rez <- p_significance(x)
rez <- p_map(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 2L))

rez <- p_map(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 2L))

rez <- rope(x)
rez <- p_significance(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 2L))

rez <- p_significance(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 2L))

rez <- rope(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 5L))

rez <- rope(x, use_iterations = FALSE)
expect_identical(c(nrow(rez), ncol(rez)), c(1L, 4L))

rez <- describe_posterior(x)
rez <- describe_posterior(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(32L, 5L))

rez <- estimate_density(x)
rez <- estimate_density(x, use_iterations = TRUE)
expect_identical(c(nrow(rez), ncol(rez)), c(1024L, 2L))
})

Expand Down

0 comments on commit ef7b1d4

Please sign in to comment.