My small area data is sensitive but I will tweak it and attach a copy soon with the graph structure for bym2. Thanks!
I ran the gcpo and that works! I also ran the same model with cpo=T (not in experimental mode), and inla.cpo works. (output below).
> r<-inla(y ~ 1, data =data.frame(y=rnorm(10)),
+ control.compute=list(control.gcpo=list(enable=TRUE)),
+ inla.mode="experimental")
> r$gcpo$gcpo
[1] 0.26262786 0.28616346 0.28385820 0.22408453 0.27350315 0.08868468 0.17671519 0.05909643 0.02096582 0.21480555
>
> r2<-inla(y ~ 1, data =data.frame(y=rnorm(10)),
+ control.compute=list(
+ cpo = T
+ )
+ )
>
> r2$cpo$failure[1] = 1
> r2$cpo$cpo
[1] 0.22542982 0.25743535 0.14716585 0.16791578 0.31492531 0.36915148 0.22855609 0.29569158 0.38738110 0.03415789
> inla.cpo(r2)
Compute new CPO/PIT values manually, for 1 cases...
index cpo.old
cpo.new pit.old
pit.new[1,] 1 0.22543 0.225427 0.154653 0.154618
The retured result contain the new values.
Call:
c("inla.core(formula = formula, family = family, contrasts = contrasts, ", " data = data, quantiles =
quantiles, E = E, offset = offset, ", " scale = scale, weights = weights, Ntrials = Ntrials, strata =
strata, ", " lp.scale = lp.scale, link.covariates = link.covariates, verbose = verbose, ", " lincomb =
lincomb, selection = selection, control.compute = control.compute, ", " control.predictor =
control.predictor, control.family = control.family, ", " control.inla = control.inla, control.fixed =
control.fixed, ", " control.mode = control.mode, control.expert = control.expert, ", " control.hazard =
control.hazard, control.lincomb = control.lincomb, ", " control.update = control.update, control.lp.scale
= control.lp.scale, ", " control.pardiso = control.pardiso, only.hyperparam = only.hyperparam, ", "
inla.call = inla.call, inla.arg = inla.arg, num.threads = num.threads, ", " blas.num.threads =
blas.num.threads, keep = keep, working.directory = working.directory, ", " silent = silent, inla.mode =
inla.mode, safe = FALSE, debug = debug, ", " .parent.frame = .parent.frame)")
Time used:
Pre = 1.33, Running = 0.0908, Post = 0.00631, Total = 1.43
>