ExplainedVariance: Variance explained by each variance component

Description Usage Arguments Details Value References Examples

Description

Proportion of variance explained by each variance component.

Usage

1
ExplainedVariance(..., n = 10000, rnd = 3)

Arguments

...

objects of class inla with with one or more random effects.

n

number of random values generated from hyperparameters.

rnd

integer indicating the number of decimal places to be used.

Details

The argument scale.model must be TRUE within f function.

Value

data.frame with the proportion of variance explained by each variance component.

References

Blangiardo, Marta, and Michela Cameletti. Spatial and Spatio-temporal Bayesian Models with R-INLA. John Wiley & Sons, 2015.

Examples

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

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

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

ExplainedVariance(mod1, mod2)

oswaldosantos/INLAOutputs documentation built on May 24, 2019, 5 p.m.