R/fast_distribution_check.R
fast_distribution_check.Rd
This check uses the fitted values and thus ignores the uncertainty on the predictions
fast_distribution_check(object, nsim = 1000) # S4 method for inla fast_distribution_check(object, nsim = 1000) # S4 method for list fast_distribution_check(object, nsim = 1000)
object | the INLA model |
---|---|
nsim | the number of simulation |
Other checks: dispersion_check
,
distribution_check
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 x 6 #> x median lcl ucl n ecdf #> <int> <dbl> <dbl> <dbl> <dbl> <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.2 0.05 0.45 0 0.2 #> 9 9 0.35 0.15 0.55 2 0.3 #> 10 10 0.45 0.249 0.7 3 0.45 #> # ... with 16 more rows