Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 29, 2023
1 parent 29bf770 commit cc4b0bd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/testthat/test-model_parameters_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ test_that("model_parameters.BBmm", {
dat$z <- as.factor(dat$z)

# apply the model
invisible(capture.output(model <- PROreg::BBmm(
fixed.formula = y ~ x,
random.formula = ~z,
m = m,
data = dat
)))
invisible(capture.output(
{
model <- PROreg::BBmm(
fixed.formula = y ~ x,
random.formula = ~z,
m = m,
data = dat
)
}
))
params <- suppressWarnings(model_parameters(model))
expect_equal(params$df_error, c(96, 96), tolerance = 1e-3)
expect_equal(params$CI_low, c(0.26363, -1.46645), tolerance = 1e-3)
Expand Down Expand Up @@ -113,7 +117,7 @@ test_that("model_parameters.multinom", {
data = bwt,
trace = FALSE
)
params <- suppressWarnings(model_parameters(model))
params <- suppressWarnings(model_parameters(model, ci_method = "wald"))
expect_equal(params$df_error, c(178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178), tolerance = 1e-3)
expect_equal(params$CI_low, c(
-1.6332, -0.11362, -0.02963, 0.13471, -0.17058,
Expand Down

0 comments on commit cc4b0bd

Please sign in to comment.