PriorityIndex: Priority index.

Description Usage Arguments Details Value Examples

Description

Priority index (PI) given by Fitted or random effects weighted by the probability of the effects being higher than a cutoff value. PI values are scaled shuch tath 0 <= PI <= 100.

Usage

1
2
PriorityIndex(..., effect = NULL, cutoff = NULL, rescale_by = NULL,
  rnd = 1)

Arguments

...

objects of class inla with fitted values or random marginals.

effect

string indicating if the priority index should be calculated using fitted values "fitted" or random effects "random".

cutoff

value above which fitted values or random effects would be in excess. If effect = "random", the cutoff is used for untransformed marginal posteriors, so cutoff = 0 (default) is used to calculate the probability of relative risk (odds ratio) > 1.

rescale_by

column name or column index of the data used to fit the model. It works only when effect = "fitted". See Details.

Details

rescale_by is intended for spatiotemporal models, where rescale_by is the temporal variable. The result is a priority index rescaled within each temporal unit. If more than one model is provided to the first argument ..., all of them must model the same spatiotemporal units.

Value

PI for each observation..PI values will be returned in a vector only if one model with fitted values (or one random effect) is evaluated; data.frame or list otherwise.

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),
             E = eaan,
             family = 'poisson', data = spn,
             control.predictor = list(compute = TRUE))

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

see <- RandomEffectsExcess(mod1, mod2, cutoff = 1)

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