| simconf.inla | R Documentation | 
simconf.inla is used for calculating simultaneous confidence regions
for latent Gaussian models estimated using INLA.
simconf.inla(
  result.inla,
  stack,
  name = NULL,
  tag = NULL,
  ind = NULL,
  alpha,
  method = "NI",
  n.iter = 10000,
  verbose = 0,
  link = FALSE,
  max.threads = 0,
  seed = NULL,
  inla.sample = TRUE
)
| result.inla | Result object from INLA call. | 
| stack | The stack object used in the INLA call. | 
| name | The name of the component for which to do the calculation. This argument should only be used if a stack object is not provided, use the tag argument otherwise. | 
| tag | The tag of the component in the stack for which to do the calculation. This argument should only be used if a stack object is provided, use the name argument otherwise. | 
| ind | If only a part of a component should be used in the calculations, this argument specifies the indices for that part. | 
| alpha | Error probability for the region. | 
| method | Method for handling the latent Gaussian structure: 
 | 
| n.iter | Number or iterations in the MC sampler that is used for approximating probabilities. The default value is 10000. | 
| verbose | Set to TRUE for verbose mode (optional). | 
| link | Transform output to the scale of the data using the link function as defined in the model estimated with INLA (default FALSE). | 
| 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). | 
| inla.sample | Set to TRUE if inla.posterior.sample should be used for the MC integration. | 
See simconf for details.
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. | 
This function requires the INLA package, which is not a CRAN package.
See https://www.r-inla.org/download-install for easy installation instructions.
David Bolin davidbolin@gmail.com
Bolin et al. (2015) Statistical prediction of global sea level from global temperature, Statistica Sinica, vol 25, pp 351-367.
Bolin, D. and Lindgren, F. (2018), Calculating Probabilistic Excursion Sets and Related Quantities Using excursions, Journal of Statistical Software, vol 86, no 1, pp 1-20.
simconf, simconf.mc, simconf.mixture
## Not run: 
if (require.nowarnings("INLA")) {
  n <- 10
  x <- seq(0, 6, length.out = n)
  y <- sin(x) + rnorm(n)
  mu <- 1:n
  result <- inla(y ~ 1 + f(mu, model = "rw2"),
    data = list(y = y, mu = mu), verbose = FALSE,
    control.compute = list(
      config = TRUE,
      return.marginals.predictor = TRUE
    ),
    num.threads = "1:1"
  )
  res <- simconf.inla(result, name = "mu", alpha = 0.05, max.threads = 1)
  plot(result$summary.random$mu$mean, ylim = c(-2, 2))
  lines(res$a)
  lines(res$b)
  lines(res$a.marginal, col = "2")
  lines(res$b.marginal, col = "2")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.