diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 06906822..3edae467 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -19,9 +19,7 @@ jobs: matrix: config: # Cmdstan isntall not working on win-latest release; check back later - # - {os: windows-latest, r: 'release'} - # use 4.1 to check with rtools40's older compiler - - {os: windows-latest, r: '4.1'} + # - {os: windows-latest, r: 'release'} - {os: windows-latest, r: 'oldrel', rtools: '42'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} diff --git a/tests/testthat/test-binomial.R b/tests/testthat/test-binomial.R index c5519016..c45a79d5 100644 --- a/tests/testthat/test-binomial.R +++ b/tests/testthat/test-binomial.R @@ -135,12 +135,25 @@ test_that("binomial() post-processing works", { 'mvgam_conditional_effects')) expect_loo(SW(loo(mod))) - dat_test$ntrials <- NULL + dat_test2 <- dat_test + dat_test2$ntrials <- NULL expect_error(plot(mod, type = 'trend', - newdata = dat_test), + newdata = dat_test2), 'Variable ntrials not found in newdata') - expect_error(forecast(mod, newdata = dat_test), + expect_error(forecast(mod, newdata = dat_test2), 'Variable ntrials not found in newdata') + + mod <- SW(mvgam(cbind(y, ntrials) ~ series, + trend_formula = ~ s(x, by = trend), + family = binomial(), + trend_model = AR(), + data = dat_train, + newdata = dat_test, + burnin = 200, + samples = 200)) + fc <- forecast(mod) + expect_true(inherits(fc, 'mvgam_forecast')) + expect_no_error(plot_mvgam_uncertainty(mod)) }) # All tests should apply to beta_binomial as well