Calculate the Residuals From an INLA Model
See also
Other statistics:
dgpoisson()
,
dispersion()
,
fitted,inla-method
,
get_observed()
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)
)
residuals(model)
#> [1] 0.58661542 1.48910067 -1.21835510 -0.31586984 -0.01504142 -1.21835510
#> [7] -0.61669826 -1.51918351 0.28578700 1.18827225 0.28578700 -0.01504142
#> [13] 1.18827225 1.18827225 -0.31586984 0.88744384 -0.61669826 0.28578700
#> [19] -1.21835510 -0.31586984