control.inla {INLA} | R Documentation

## control.inla

### Description

Control variables in `⁠control.*⁠` for use with `inla()`. The functions can be used to TAB-complete arguments, and returns a list of the default control arguments, unless overridden by specific input arguments.

### Usage

    control.inla(
      strategy = "auto",
      int.strategy = "auto",
      int.design = NULL,
      interpolator = "auto",
      fast = TRUE,
      linear.correction = NULL,
      h = 0.005,
      dz = 0.75,
      diff.logdens = 6,
      print.joint.hyper = TRUE,
      force.diagonal = FALSE,
      skip.configurations = TRUE,
      adjust.weights = TRUE,
      tolerance = 0.005,
      tolerance.f = NULL,
      tolerance.g = NULL,
      tolerance.x = NULL,
      tolerance.step = NULL,
      restart = 0L,
      optimiser = "default",
      verbose = NULL,
      reordering = "auto",
      cpo.diff = NULL,
      npoints = 9,
      cutoff = 1e-04,
      adapt.hessian.mode = NULL,
      adapt.hessian.max.trials = NULL,
      adapt.hessian.scale = NULL,
      adaptive.max = 25L,
      huge = FALSE,
      step.len = 0,
      stencil = 5L,
      lincomb.derived.correlation.matrix = FALSE,
      diagonal = 0,
      numint.maxfeval = 1e+05,
      numint.relerr = 1e-05,
      numint.abserr = 1e-06,
      cmin = -Inf,
      b.strategy = "keep",
      step.factor = -0.1,
      global.node.factor = 2,
      global.node.degree = .Machine$integer.max,
      stupid.search = TRUE,
      stupid.search.max.iter = 1000L,
      stupid.search.factor = 1.05,
      control.vb = INLA::control.vb(),
      num.gradient = "central",
      num.hessian = "central",
      optimise.strategy = "smart",
      use.directions = TRUE,
      constr.marginal.diagonal = sqrt(.Machine$double.eps),
      improved.simplified.laplace = FALSE,
      parallel.linesearch = FALSE,
      compute.initial.values = FALSE,
      hessian.correct.skewness.only = TRUE
    )

    inla.set.control.inla.default(...)

### Arguments

`strategy` | Character The strategy to use for the approximations; one of 'auto' (default), 'gaussian', 'simplified.laplace', 'laplace' or 'adaptive'.
`int.strategy` | Character The integration strategy to use; one of 'auto' (default), 'ccd', 'grid', 'eb' (empirical bayes), 'user' or 'user.std'. For the experimental mode, then 'grid' equal 'ccd' for more than two hyperparameters.
`int.design` | Matrix Matrix of user-defined integration points and weights. Each row consists theta values and the integration weight. (EXPERIMENTAL!).
`interpolator` | Character The interpolator used to compute the marginals for the hyperparameters. One of 'auto', 'nearest', 'quadratic', 'weighted.distance', 'ccd', 'ccdintegrate', 'gridsum', 'gaussian'. Default is 'auto'.
`fast` | Logical If TRUE, then replace conditional modes in the Laplace approximation with conditional expectation (default TRUE).
`linear.correction` | Logical Default TRUE for the 'strategy = laplace' option.
`h` | Numerical The step-length for the gradient calculations for the hyperparameters. Default 0.005.
`dz` | Numerical The step-length in the standarised scale for the integration of the hyperparameters. Default 0.75.
`diff.logdens` | Numerical The difference of the log.density for the hyperpameters to stop numerical integration using int.strategy='grid'. Default 6.
`print.joint.hyper` | Logical If TRUE, the store also the joint distribution of the hyperparameters (without any costs). Default TRUE.
`force.diagonal` | Logical If TRUE, then force the Hessian to be diagonal. (Default `FALSE`)
`skip.configurations` | Logical Skip configurations if the values at the main axis are to small. (Default `TRUE`)
`adjust.weights` | Logical If TRUE then just more accurate integration weights. (Default TRUE.)
`tolerance` | Numerical The tolerance for the optimisation of the hyperparameters. If set, this is the default value for for '2.5tolerance.f', 'tolerance.g', '5tolerance.x' and '1000*tolerance.step'; see below.
`tolerance.f` | Numerical The tolerance for the absolute change in the log posterior in the optimisation of the hyperparameters.
`tolerance.g` | Numerical The tolerance for the absolute change in the gradient of the log posterior in the optimisation of the hyperparameters.
`tolerance.x` | Numerical The tolerance for the change in the hyperparameters (root-mean-square) in the optimisation of the hyperparameters.
`tolerance.step` | Numerical The tolerance for the change in root-mean_squre in the inner Newton-like optimisation of the latent field.
`restart` | Numerical To improve the optimisation, the optimiser is restarted at the found optimum 'restart' number of times.
`optimiser` | Character The optimiser to use; one of 'gsl' or 'default'.
`verbose` | Logical Run in verbose mode? (Default FALSE)
`reordering` | Character Type of reordering to use. (EXPERT OPTION; one of "AUTO", "DEFAULT", "IDENTITY", "REVERSEIDENTITY", "BAND", "METIS", "GENMMD", "AMD", "MD", "MMD", "AMDBAR", "AMDC", "AMDBARC", or the output from `inla.qreordering`. Default is 'auto'.)
`cpo.diff` | Numerical Threshold to define when the cpo-calculations are inaccurate. (EXPERT OPTION.)
`npoints` | Numerical Number of points to use in the 'stratey=laplace' approximation (default 9)
`cutoff` | Numerical The cutoff used in the 'stratey=laplace' approximation. (Smaller value is more accurate and more slow.) (default 1e-4)
`adapt.hessian.mode` | Logical Should optimisation be continued if the Hessian estimate is void? (Default TRUE)
`adapt.hessian.max.trials` | Numerical Number of steps in the adaptive Hessian optimisation
`adapt.hessian.scale` | Numerical The scaling of the 'h' after each trial.
`adaptive.max` | Selecting `strategy="adaptive"` will chose the default strategy for all fixed effects and model components with length less or equal to `adaptive.max`, for others, the gaussian strategy will be applied.
`huge` | Logical If TRUE then try to do some of the internal parallelisations differently. Hopefully this will be of benefit for 'HUGE' models. (Default FALSE.) THIS OPTION IS OBSOLETE AND NOT USED!
`step.len` | Numerical The step-length used to compute numerical derivaties of the log-likelihood (0 means `default` which depends on `stencil`)
`stencil` | Numerical Number of points in the stencil used to compute the numerical derivaties of the log-likelihood (5, 7 or 9). (default 5)
`lincomb.derived.correlation.matrix` | Logical If TRUE compute also the correlations for the derived linear combinations, if FALSE do not (Default FALSE)
`diagonal` | Numerical Expert use only! Add a this value on the diagonal of the joint precision matrix. (default 0.0)
`numint.maxfeval` | Numerical Maximum number of function evaluations in the the numerical integration for the hyperparameters. (Default 100000.)
`numint.relerr` | Numerical Relative error requirement in the the numerical integration for the hyperparameters. (Default 1e-5)
`numint.abserr` | Numerical Absolute error requirement in the the numerical integration for the hyperparameters. (Default 1e-6)
`cmin` | Numerical The minimum value for the negative Hessian from the likelihood. Increasing this value will stabalise the optimisation but can introduce bias. (Default -Inf)
`b.strategy` | Character If `cmin` is used, either keep the linear term (with `b.strategy="keep"`) or skip the contribution by setting the linear term to zero (`b.strategy="skip"`). The default value is `"keep"`
`step.factor` | Numerical The step factor in the Newton-Raphson algorithm saying how large step to take (Default 1.0) YES! setting this to a negative values means = 1, EXCEPT the first time (for each thread) where |step.factor| is used.
`global.node.factor` | Numerical The factor which defines the degree required (how many neighbors), as a fraction of `n-1`, that is required to be classified as a global node and numbered last (whatever the reordering routine says). Here, `n`, is the size of the graph. (Disabled if larger than 1, default 2)
`global.node.degree` | Numerical The degree required (number of neighbors) to be classified as a global node and numbered last (whatever the reordering routine says). (default `.Machine$integer.max`)
`stupid.search` | Logical Enable or disable the stupid-search-algorithm, if the Hessian calculations reveals that the mode is not found. (Default `TRUE`.)
`stupid.search.max.iter` | Numerical Maximum number of iterations allowed for the stupid-search-algorithm. (default 1000)
`stupid.search.factor` | Numerical Factor (>=1) to increase the step-length with after each new iteration. (default 1.05)
`control.vb` | list of arguments for various VB corrections. See `control.vb()` for details.
`num.gradient` | Character Set the numerical scheme to compute the gradient, one of `"forward"` or `"central"` (default).
`num.hessian` | Character Set the numerical scheme to compute the Hessian, one of `"forward"` or `"central"` (default).
`optimise.strategy` | Character THIS OPTION IS EXPERIMENTAL. Chose the optimiser strategy, one of `"plain"` or `"smart"` (default)
`use.directions` | THIS OPTION IS EXPERIMENTAL. Unless `FALSE` or `NULL`, use directions for computing gradient and Hessian, initialised with `use.directions` if a matrix.
`constr.marginal.diagonal` | Add stability to `⁠AQ^-1A^T⁠` by adding a small diagonal term. (default `epsilon^0.5`)
`improved.simplified.laplace` | If `TRUE` use an experimental improved variant, otherwise, use the standard one.
`parallel.linesearch` | Use serial (default) or parallel line-search (highly experimental for the moment)
`compute.initial.values` | Compute initial values for the latent field or not. (experimental-mode only)
`hessian.correct.skewness.only` | If TRUE (default) correct only skewness in the Hessian, for the hyperparameters. If FALSE, correct also variance. (This option is for experimental-mode only)
`...` | Named arguments passed on to the main function

### See Also

Other control: `control.bgev()`, `control.compute()`, `control.expert()`, `control.family()`, `control.fixed()`, `control.gcpo()`, `control.group()`, `control.hazard()`, `control.lincomb()`, `control.link()`, `control.lp.scale()`, `control.mix()`, `control.mode()`, `control.numa()`, `control.pardiso()`, `control.pom()`, `control.predictor()`, `control.scopy()`, `control.sem()`, `control.stiles()`, `control.taucs()`, `control.update()`, `control.vb()`

[Package INLA version 25.06.07 Index]