Skip to content

Commit

Permalink
reduce example time for nmixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Apr 24, 2024
1 parent 99c41c5 commit c06a9cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
8 changes: 3 additions & 5 deletions R/families.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ student_t = function(link = 'identity'){
#' # add a 'cap' variable that defines the maximum latent N to
#' # marginalize over when estimating latent abundance; in other words
#' # how large do we realistically think the true abundance could be?
#' cap = 100) %>%
#' cap = 80) %>%
#' dplyr::select(- replicate) -> testdat
#'
#'
#'# Now add another species that has a different temporal trend and a smaller
#'# detection probability (0.45 for this species)
#'testdat = testdat %>%
Expand Down Expand Up @@ -161,12 +160,11 @@ student_t = function(link = 'identity'){
#' # priors can be set in the usual way
#' priors = c(prior(std_normal(), class = b),
#' prior(normal(1, 1.5), class = Intercept_trend)),
#' samples = 1000)
#' burnin = 300,
#' samples = 300)
#'
#' # The usual diagnostics
#' summary(mod)
#' code(mod)
#' loo(mod)
#'
#' # Plotting conditional effects
#' library(ggplot2)
Expand Down
8 changes: 3 additions & 5 deletions man/mvgam_families.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/mvgam.dll
Binary file not shown.
8 changes: 8 additions & 0 deletions tests/testthat/test-mvgam.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ context("mvgam")
# JAGS setup should work, whether installed or not
test_that("JAGS setups work", {
simdat <- sim_mvgam()
mod <- mvgam(y ~ s(season),
trend_model = 'RW',
data = simdat$data_train,
family = poisson(),
use_stan = FALSE,
run_model = FALSE)
expect_true(inherits(mod, 'mvgam_prefit'))

mod <- mvgam(y ~ s(season),
trend_model = 'AR1',
data = simdat$data_train,
Expand Down

0 comments on commit c06a9cc

Please sign in to comment.