inla-control {INLA} | R Documentation

## inla control argument handlers

### Description

Methods for controlling `inla()` and `f()` `control` arguments

### Usage

    ctrl_class(x)

    ctrl_type(x)

    ## Default S3 method:
    ctrl_type(x)

    ## S3 method for class 'character'
    ctrl_type(x)

    ctrl_check(x, the_type, default = NULL)

    ctrl_object(x, the_type, data = NULL, check = TRUE)

    ctrl_default(x)

    ## S3 method for class 'character'
    ctrl_default(x)

    ## S3 method for class 'inla_ctrl_object'
    ctrl_default(x)

    ctrl_update(x, ...)

    ## S3 method for class 'inla_ctrl_object'
    ctrl_update(x, ..., default = NULL)

    ## S3 method for class 'ctrl_family'
    ctrl_update(x, ..., model)

    ## S3 method for class 'ctrl_mix'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_link'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_lp_scale'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_predictor'
    ctrl_update(x, ..., control.compute, control.inla)

    ## S3 method for class 'ctrl_compute'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_group'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_scopy'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_hazard'
    ctrl_update(x, ...)

    ## S3 method for class 'ctrl_mode'
    ctrl_update(x, ...)

### Arguments

`default` | A default object of matching `⁠ctrl_*⁠` class. If `NULL`, uses `ctrl_default(x)` instead.
`data` | An optional data object (`data.frame`, `list`, or `environment`, see the `what` argument of `base::attach()`).
`check` | logical; If `TRUE` (default), calls `ctrl_check()` to verify compliance with the default object of the target control type. Must be set to `FALSE` by code calling `ctrl_object()` to construct default objects.
`model` | character; a model specifier
`control.compute` | A `ctrl_compute` object.
`control.inla` | A `ctrl_inla` object.

### Functions

- `ctrl_type()`: Returns the type-part of the control class name, i.e. without the "ctrl_" prefix.

- `ctrl_check()`: Checks that the elements are named and match the available ones in the corresponding default control object.

- `ctrl_object()`: Construct a control object and check that it's compatible with the corresponding defaults.

- `ctrl_update(inla_ctrl_object)`: Merges the `x` object with the defaults for control type `ctrl_type(x)`. Recursively handles `⁠control.*⁠` elements, with `NULL` defaults also being replaced by their corresponding defaults before merging.

- `ctrl_update(ctrl_predictor)`: Requires `control.compute` and `control.inla` to be provided, in order to determine if `compute` needs to be forced to `TRUE`. To ignore, use `ctrl_update(x, control.compute = list(), control.inla = list())`.

- `ctrl_update(ctrl_compute)`: If `residuals` is `TRUE`, also sets `dic = TRUE`.

[Package INLA version 26.08.22 Index]