Learn R Programming

excursions (version 2.0.6)

simconf: Simultaneous confidence regions for Gaussian models

Description

simconf is used for calculating simultaneous confidence regions for Gaussian models $x$. The function returns upper and lower bounds $a$ and $b$ such that $P(a

Usage

simconf(alpha,
        mu,
        Q,
        n.iter=10000,
        Q.chol,
        vars,
        ind=NULL,
        verbose=0,
        max.threads=0,
        seed=NULL,
        LDL=TRUE)

Arguments

alpha
Error probability for the region.
mu
Expectation vector for the Gaussian distribution.
Q
Precision matrix for the Gaussian distribution.
n.iter
Number or iterations in the MC sampler that is used for approximating probabilities. The default value is 10000.
Q.chol
The Cholesky factor of the precision matrix (optional)
vars
Precomputed marginal variances (optional)
ind
Indices of the nodes that should be analyzed (optional)
verbose
Set to TRUE for verbose mode (optional)
max.threads
Decides the number of threads the program can use. Set to 0 for using the maximum number of threads allowed by the system (default).
seed
Random seed (optional)
LDL
Use LDL factorisations? This is useful for analysis of problems with positive semidefinite precisions.

Value

  • A list:
  • aThe lower bound.
  • bThe upper bound.
  • a.marginalThe lower bound for pointwise confidence bands.
  • b.marginalThe upper bound for pointwise confidence bands.

References

Bolin et al. (2015) Statistical prediction of global sea level from global temperature, Statistica Sinica, Vol 25, pp 351-367.

Examples

Run this code
## Create mean and a tridiagonal precision matrix
n = 11
mu.x = seq(-5, 5, length=n)
Q.x = Matrix(toeplitz(c(1, -0.1, rep(0, n-2))))

## calculate the confidence region
conf = simconf(0.05, mu.x, Q.x, max.threads=2)

## Plot the region
plot(mu.x, type="l", ylim=c(-10, 10),
     main='Mean (black) and confidence region (red)')
lines(conf$a, col=2)
lines(conf$b, col=2)

Run the code above in your browser using DataLab