inla.group.cv {INLA}R Documentation

Compute group.cv-values

Description

From a fitted model, compute and add the group.cv-values

Usage

inla.group.cv(
  result,
  group.cv = NULL,
  num.level.sets = -1,
  strategy = c("posterior", "prior"),
  size.max = 32,
  groups = NULL,
  selection = NULL,
  friends = NULL,
  verbose = FALSE,
  epsilon = 0.005,
  prior.diagonal = 1e-04,
  keep = NULL,
  remove = NULL,
  remove.fixed = TRUE
)

Arguments

result

An object of class inla, ie a result of a call to inla().

group.cv

If given, the groups are taken from this argument. group.cv must be the output of previous call to inla.group.cv().

num.level.sets

Number of level.sets to use. The default value -1 corresponds to leave-one-out cross-validation.

strategy

One of "posterior" or "prior". See the vignette for details.

size.max

The maximum size of a group. If the computed group-size is larger, it will be truncated to size.max.

groups

An (optional) predefined list of groups. See the vignette for details.

selection

An optional list of data-indices to use. If not given, then all data are used.

friends

An optional list of lists of indices to use a friends

verbose

Run with verbose output of some of the internals in the calculations. This option will also enable inla(..., verbose=TRUE) if its not enabled already.

epsilon

Two correlations with a difference less than epsilon, will be classified as identical.

prior.diagonal

When strategy="prior", prior.diagonal is added to the diagonal of the prior precision matrix to avoid singularities

keep

For strategy="prior", then this gives a vector of the name of model-components TO USE when computing the groups. See the vignette for details. Not both of keep and remove can be defined.

remove

For strategy="prior", then this gives a vector of the name of model-components NOT TO USE when computing the groups. See the vignette for details. Not both of keep and remove can be defined.

remove.fixed

For strategy="prior", this is the default option which is in effect if both keep and remove are NULL. If TRUE, it will remove (or condition on) all fixed effects when computing the groups. See the vignette for details.

Value

The object returned is list related to leave-group-out cross-validation. See the vignette for details.

Author(s)

Havard Rue hrue@r-inla.org

See Also

control.compute()


[Package INLA version 23.12.17 Index]