medalplot: Medal plot

Description Usage Arguments Details Value Author(s) References Examples

Description

Computes the radii of the inner, middle and outer disks in a ‘medal plot’.

Usage

1
medalplot(Q, Qo, A, subset = 1L:nrow(A), Sigma_part = NULL, xsamp = NULL)

Arguments

Q

sparse or dense precision matrix of the Gaussian random field X

Qo

sparse or dense precision of the observation error e. Typically this is diagonal

A

sparse or dense matrix mapping the observations Z to the underlying field X under the model Z = AX + e

subset

a vector identifying which of the rows in A to use in constructing the medals

Sigma_part

(optional) the partial or full posterior covariance matrix Var(X|Z) (if available)

xsamp

(optional) an n x N matrix containing the samples of the posterior distribution of X. N is the number of samples.

Details

The medal plot is a visualisation tool for large-scale latent Gaussian models of the form Z = AX + e where Z are the observations, A is a mapping matrix, X is the collection of hidden states and e is the additive noise with variance T. The medal plot reveals the relation of the uncertainty of the update on linear combinations of Y = LX (where Y is a subet of the rows of A) with respect to the observation uncertainty T and the prior uncertainty Var(X). The medal also highlights the effect of the field's dependence structure on uncertainty reduction. The plot consists of a set of concentric disks with the following properties:

Value

A data frame with five fields, r1: the radius of the outer disk, r2: the radius of the middle disk, r3: the radius of the inner disk, col_outer: the colour of the outer disk and col_inner: the colour of the inner disk.

Author(s)

Andrew Zammit-Mangion and Jonathan C. Rougier

References

Jonathan C. Rougier, Andrew Zammit-Mangion and Nana Schoen (2014). Visualisation for large-scale Gaussian updates. http://www.maths.bris.ac.uk/~MAZJCR/rougierVLSGU.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
### Define the Matern function
Matern <- function(r=0:100,nu=3/2,var=1,kappa=0.1) {
K <- var/((2^(nu-1))*gamma(nu))*(kappa*abs(r))^nu*besselK(kappa*abs(r),nu=nu)
    diag(K) = var
return(K) }

### Construct a valid covariance matrix on a grid of 20 cells
n <- 20
s <- 1:n
S <- Matern(as.matrix(dist(s)), nu = 3/2,var=4, kappa = 0.1)
Q <- chol2inv(chol(S))

### Observations and mapping matrix
sy <- 1:n
sigmav <- rep(1,n)
Qo <- diag(1/sigmav^2)
ny <- length(sy)
A <- diag(rep(1,n))

### Medal plot function
M <- medalplot(Q=Q,Qo=Qo,A=A)

andrewzm/medalplot documentation built on May 10, 2019, 11:15 a.m.