Skip to contents

This check uses the fitted values and thus ignores the uncertainty on the predictions

Usage

fast_distribution_check(object, nsim = 1000)

# S4 method for class 'inla'
fast_distribution_check(object, nsim = 1000)

# S4 method for class 'list'
fast_distribution_check(object, nsim = 1000)

Arguments

object

the INLA model

nsim

the number of simulation

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)
)
fast_distribution_check(model)
#> # A tibble: 26 × 6
#>        x median   lcl   ucl     n  ecdf
#>    <int>  <dbl> <dbl> <dbl> <int> <dbl>
#>  1     1   0     0     0        0  0   
#>  2     2   0     0     0        0  0   
#>  3     3   0     0     0.05     0  0   
#>  4     4   0     0     0.1      0  0   
#>  5     5   0.05  0     0.15     0  0   
#>  6     6   0.05  0     0.2      1  0.05
#>  7     7   0.15  0     0.3      3  0.2 
#>  8     8   0.25  0.05  0.45     0  0.2 
#>  9     9   0.35  0.15  0.55     2  0.3 
#> 10    10   0.45  0.25  0.7      3  0.45
#> # ℹ 16 more rows