crt.bayes.control: Returns Control Parameters for Approximating Bayesian...

Description Usage Arguments Details Value Examples

View source: R/6-UserBayesFunctions.R

Description

This function returns two lists each corresponds to an implemented integration method for approximating the integrals in Bayesian criteria. The first list is named cubature and contains the hcubature control parameters to approximate the integrals with an adaptive multivariate integration method over hypercubes. The second list is named quadrature and contains the createNIGrid tuning parameters to approximate the integrals with the quadrature methods.

Usage

1
2
3
4
5
6
crt.bayes.control(
  method = c("cubature", "quadrature"),
  cubature = list(tol = 1e-05, maxEval = 50000, absError = 0),
  quadrature = list(type = c("GLe", "GHe"), level = 6, ndConstruction = "product",
    level.trans = FALSE)
)

Arguments

method

A character denotes which method to be used to approximate the integrals in Bayesian criteria. "cubature" corresponds to the adaptive multivariate integration method using the hcubature algorithm (default). "quadrature" corresponds the traditional quadrature formulas and calls the function createNIGrid.

cubature

A list that will be passed to the arguments of the function hcubature for the adaptive multivariate integration. It is required and used when crt.bayes.control$method = "cubature" in the parent function, e.g. bayes. See 'Details'.

quadrature

A list that will be passed to the arguments of the function createNIGrid for the quadrature-based integration. It is required and used when crt.bayes.control$method = "quadrature" in the parent function, e.g. bayes. See 'Details'.

Details

cubature is a list that its components will be passed to the function hcubature and they are:

tol

The maximum tolerance. Defaults to 1e-5.

maxEval

The maximum number of function evaluations needed. Note that the actual number of function evaluations performed is only approximately guaranteed not to exceed this number. Defaults to 5000.

absError

The maximum absolute error tolerated. Defaults to 0.

One can specify a maximum number of function evaluations. Otherwise, the integration stops when the estimated error is less than the absolute error requested, or when the estimated error is less than tol times the absolute value of the integral, or when the maximum number of iterations is reached, whichever is earlier. cubature is activated when crt.bayes.control$method = "cubature" in any of the parent functions (for example, bayes).

quadrature is a list that its components will be passed to the function createNIGrid and they are:

type

Quadrature rule (see Details of createNIGrid) Defaults to "GLe".

level

Accuracy level (typically number of grid points for the underlying 1D quadrature rule). Defaults to 6.

ndConstruction

Character vector which denotes the construction rule for multidimensional grids. "product" for product rule, returns a full grid (default). "sparse" for combination technique, leads to a regular sparse grid.

level.trans

Logical variable denotes either to take the levels as number of grid points (FALSE = default) or to transform in that manner that number of grid points = 2^(levels-1) (TRUE). See, codecreateNIGrid, for details.

quadrature is activated when crt.bayes.control$method = "quadrature" in any of the parent functions (for example, bayes).

Value

A list of two lists each contains the control parameters for hcubature and createNIGrid, respectively.

Examples

1
2
3
crt.bayes.control()
crt.bayes.control(cubature = list(tol = 1e-4))
crt.bayes.control(quadrature = list(level = 4))

ICAOD documentation built on Oct. 23, 2020, 6:40 p.m.