Learn R Programming

excursions (version 2.4.1)

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<x<b) = 1-alpha\).

Usage

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

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).

Value

An object of class "excurobj" with elements

a

The lower bound.

b

The upper bound.

a.marginal

The lower bound for pointwise confidence bands.

b.marginal

The upper bound for pointwise confidence bands.

Details

The pointwise confidence bands are based on the marginal quantiles, meaning that a.marignal = mu + \(q_{alpha}\) and b.marginal = mu + \(q_{1-alpha}\), where mu is the mean and \(q_{alpha}\) is a vector with the alpha-quantiles of x-mu.

The simultaneous confidence bands are defined as a = mu + \(c*q_{alpha}\) and b = mu + \(c*q_{1-alpha}\), where \(c\) is a constant computed such that \(P(a < x < b) = 1-alpha\).

References

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

See Also

simconf.inla, simconf.mc, simconf.mixture

Examples

Run this code
# NOT RUN {
## 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