Skip to content

Commit bb945e6

Browse files
committed
tests
1 parent 0469902 commit bb945e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/testthat/test-model_parameters_df_method.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ model3 <- suppressMessages(glmmTMB::glmmTMB(
1717
data = mtcars,
1818
REML = TRUE
1919
))
20+
model4 <- suppressMessages(glmmTMB::glmmTMB(
21+
mpg ~ as.factor(gear) * hp + as.factor(am) + wt + (1 | cyl),
22+
data = mtcars,
23+
REML = FALSE
24+
))
2025

2126
mp0 <- model_parameters(model, digits = 5, effects = "fixed")
2227
mp1 <- model_parameters(model, digits = 5, ci_method = "normal", effects = "fixed")
@@ -106,6 +111,16 @@ test_that("model_parameters, ci_method kenward", {
106111

107112
expect_equal(mp5$SE, mp3$SE, tolerance = 1e-3)
108113
expect_equal(mp5$df_error, mp3$df_error, tolerance = 1e-3)
114+
115+
expect_warning(expect_warning(expect_warning(
116+
{
117+
mp6 <- model_parameters(model4, digits = 5, ci_method = "kr", effects = "fixed")
118+
},
119+
regex = "Model was not fitted"
120+
)))
121+
122+
expect_equal(mp5$SE, mp6$SE, tolerance = 1e-3)
123+
expect_equal(mp5$df_error, mp6$df_error, tolerance = 1e-3)
109124
})
110125

111126
test_that("model_parameters, ci_method wald (t)", {

0 commit comments

Comments
 (0)