diff --git a/tests/testthat/test-glmmTMB.R b/tests/testthat/test-glmmTMB.R index fa4431f6e..821d47f11 100644 --- a/tests/testthat/test-glmmTMB.R +++ b/tests/testthat/test-glmmTMB.R @@ -952,3 +952,21 @@ test_that("get_predicted", { expect_warning(get_predicted(m1, predict = "prediction")) expect_warning(get_predicted(m1, predict = "classification")) }) + + +test_that("model_info, ordered beta", { + skip_if_not_installed("glmmTMB") + skip_if_not_installed("datawizard") + skip_if_not_installed("lme4") + skip_if_not(packageVersion("glmmTMB") >= "1.1.5") + data(sleepstudy, package = "lme4") + sleepstudy$y <- datawizard::normalize(sleepstudy$Reaction) + m <- glmmTMB::glmmTMB( + y ~ Days + (Days | Subject), + data = sleepstudy, + family = ordbeta() + ) + out <- model_info(m) + expect_true(out$is_orderedbeta) + expect_identicl(out$family, "ordbeta") +}) diff --git a/tests/testthat/test-rstanarm.R b/tests/testthat/test-rstanarm.R index 9adea7f17..31f73a9d3 100644 --- a/tests/testthat/test-rstanarm.R +++ b/tests/testthat/test-rstanarm.R @@ -161,7 +161,7 @@ test_that("model_info-stanreg-glm", { list( is_binomial = TRUE, is_bernoulli = FALSE, is_count = FALSE, is_poisson = FALSE, is_negbin = FALSE, is_beta = FALSE, is_betabinomial = FALSE, - is_dirichlet = FALSE, is_exponential = FALSE, is_logit = TRUE, + is_orderedbeta = FALSE, is_dirichlet = FALSE, is_exponential = FALSE, is_logit = TRUE, is_probit = FALSE, is_censored = FALSE, is_truncated = FALSE, is_survival = FALSE, is_linear = FALSE, is_tweedie = FALSE, is_zeroinf = FALSE, is_zero_inflated = FALSE, is_dispersion = FALSE, @@ -183,7 +183,7 @@ test_that("model_info-stanreg-glm", { list( is_binomial = FALSE, is_bernoulli = FALSE, is_count = FALSE, is_poisson = FALSE, is_negbin = FALSE, is_beta = FALSE, is_betabinomial = FALSE, - is_dirichlet = FALSE, is_exponential = FALSE, is_logit = FALSE, + is_orderedbeta = FALSE, is_dirichlet = FALSE, is_exponential = FALSE, is_logit = FALSE, is_probit = FALSE, is_censored = FALSE, is_truncated = FALSE, is_survival = FALSE, is_linear = TRUE, is_tweedie = FALSE, is_zeroinf = FALSE, is_zero_inflated = FALSE, is_dispersion = FALSE, @@ -205,7 +205,7 @@ test_that("model_info-stanreg-glm", { list( is_binomial = TRUE, is_bernoulli = TRUE, is_count = FALSE, is_poisson = FALSE, is_negbin = FALSE, is_beta = FALSE, is_betabinomial = FALSE, - is_dirichlet = FALSE, is_exponential = FALSE, is_logit = TRUE, + is_orderedbeta = FALSE, is_dirichlet = FALSE, is_exponential = FALSE, is_logit = TRUE, is_probit = FALSE, is_censored = FALSE, is_truncated = FALSE, is_survival = FALSE, is_linear = FALSE, is_tweedie = FALSE, is_zeroinf = FALSE, is_zero_inflated = FALSE, is_dispersion = FALSE,