Use simulations to check for overdispersion or underdispersion

dispersion_check(object, nsim = 1000)

# S4 method for inla
dispersion_check(object, nsim = 1000)

Arguments

object

the INLA model

nsim

the number of simulation

See also

Examples

library(INLA) set.seed(20181202) model <- inla( poisson ~ 1, family = "poisson", data = data.frame( poisson = rpois(20, lambda = 10), base = 1 ), control.predictor = list(compute = TRUE) ) dc <- dispersion_check(model) str(dc)
#> List of 2 #> $ data : num 0.781 #> $ model: num [1:1000] 0.875 0.782 0.768 0.748 0.89 ... #> - attr(*, "class")= chr "dispersion_check"