CPO: Conditional predictive ordinates

Description Usage Arguments Details Value References Examples

View source: R/CPO.R

Description

Sort and display the sum of the log of CPO's of INLA models.

Usage

1
CPO(..., failure_cutoff = 0, decreasing = TRUE, rnd = 3)

Arguments

...

objects of class inla with computed CPO's.

failure_cutoff

value between 0 and 1. CPO's with a failure score greater than failure_cutoff are considered unreliable and are ignored.

decreasing

logical. If TRUE (default), CPO's are displayed in decreasing order (higher values indicate better prediction).

rnd

integer indicating the number of decimal places to be used.

Details

control.compute = list(cpo = TRUE) must be used within inla function.

Value

matrix with the sum of the log of CPO's and the proportion of failures of each models' CPO.

References

Blangiardo, M., Cameletti, M., Baio, G., & Rue, H. (2013). Spatial and spatio-temporal models with R-INLA. Spatial and spatio-temporal epidemiology, 7, 39-55.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(sp)

mod1 <- inla(aan ~ f(id, model = 'bym', graph = sp.adj),
             family = 'poisson', data = spn, E = eaan,
             control.compute = list(cpo = TRUE))

mod2 <- inla(aan ~ shvn + f(id, model = 'bym', graph = sp.adj),
             family = 'poisson', data = spn,  E = eaan,
             control.compute = list(cpo = TRUE))

CPO(mod1, mod2)

oswaldosantos/INLAOutputs documentation built on Dec. 23, 2018, 4:06 p.m.