inst/tests/test-random-effects.R

context("random_effects")

test_that("random_effects works", {
  
  model <- jags_model(" model { 
                    bLambda ~ dlnorm(0,10^-2) 
                    for (i in 1:nrow) { 
                    x[i]~dpois(bLambda) 
                    } 
}")
  
  expect_that(is.null(random_effects(model)), is_true())
  
  random_effects(model) <- NULL
  expect_that(is.null(random_effects(model)), is_true())
})
poissonconsulting/jaggernaut documentation built on Feb. 18, 2021, 11:10 p.m.