Skip to content

Commit

Permalink
remove 4.1 tests due to dependency on newer version of rstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Apr 23, 2024
1 parent 5bf88c6 commit 4aeda1c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
19 changes: 16 additions & 3 deletions tests/testthat/test-binomial.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4aeda1c

Please sign in to comment.