Learn R Programming

excursions (version 2.0.6)

contourmap: Contour maps and contour map quality measures for latent Gaussian models

Description

contourmap is used for calculating contour maps and quality measures for contour maps for latent Gaussian models.

Usage

contourmap(mu,
           Q,
           vars,
           n.levels,
           ind,
           levels,
           type = c("standard",
                    "equalarea",
                    "P0-optimal",
                    "P1-optimal",
                    "P2-optimal"),
           compute = list(F=TRUE, measures = NULL),
           use.marginals=TRUE,
           alpha,
           F.limit,
           n.iter=10000,
           verbose=FALSE,
           max.threads=0,
           seed=NULL)

Arguments

mu
Expectation vector
Q
Precision matrix
vars
Precomputed marginal variances (optional)
n.levels
Number of levels in contour map
ind
Indices of the nodes that should be analyzed (optional)
levels
Levels to use in contour map
type
Type of contour map. One of:
  • 'standard'
{Equidistant levels between min(mu) and max(mu) (default)} 'equalarea'{Levels such that different spatial regions are approximately equal in size} 'P0-optimal'{

Value

  • contourmap returns an object of class "excurobj". This is a list that can contains the following arguments:
  • uContour levels
  • n.levelsThe number of contours used
  • u.eThe values associated with the level sets G_k
  • GA vector which shows which of the level sets G_k each node belongs to.
  • mapRepresentation of the contour map with map[i]=u.e[k] if i is in G_k
  • FThe contour map function (if computed)
  • MContour avoiding sets (if F is computed). $M=-1$ for all non-significant nodes and $M=k$ for nodes that belong to $M_k$.
  • P0/P1/P2Calculated quality measures (if computed)
  • P0bound/P1bound/P2boundCalculated upper bounds quality measures (if computed)
  • metaA list containing various information about the calculation.

item

  • compute
  • 'measures':
  • use.marginals
  • alpha
  • F.limit
  • n.iter
  • verbose
  • max.threads
  • seed

itemize

  • 'F':

code

alpha

References

Bolin, D. and Lindgren, F. (2014) Quantifying the uncertainty of contour maps, ArXiv preprint

Examples

Run this code
n = 10
  Q = Matrix(toeplitz(c(1, -0.5, rep(0, n-2))))
  mu = seq(-5, 5, length=n)
  lp <- contourmap(mu,Q,n.levels = 2, compute=list(F=FALSE, measures = c("P1","P2")),max.threads=1)

Run the code above in your browser using DataLab