Skip to contents

When inla_f=TRUE, implementations must return a vector that would be interpretable by an INLA::f(..., values = ...) specification. The exception is the method for bm_multi, that returns a multi-column data frame if multi=TRUE.

Usage

ibm_values(mapper, inla_f = FALSE, ...)

# Default S3 method
ibm_values(mapper, inla_f = FALSE, ...)

# S3 method for class 'bm_fmesher'
ibm_values(mapper, ...)

# S3 method for class 'bm_fm_mesh_1d'
ibm_values(mapper, ...)

# S3 method for class 'bm_taylor'
ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...)

# S3 method for class 'bm_linear'
ibm_values(mapper, ...)

# S3 method for class 'bm_matrix'
ibm_values(mapper, ...)

# S3 method for class 'bm_factor'
ibm_values(mapper, ...)

# S3 method for class 'bm_const'
ibm_values(mapper, ...)

# S3 method for class 'bm_shift'
ibm_values(mapper, ..., state = NULL, n_state = NULL)

# S3 method for class 'bm_scale'
ibm_values(mapper, ..., state = NULL, n_state = NULL)

# S3 method for class 'bm_aggregate'
ibm_values(mapper, ..., state = NULL, n_state = NULL)

# S3 method for class 'bm_marginal'
ibm_values(mapper, ..., state = NULL, n_state = NULL)

# S3 method for class 'bm_pipe'
ibm_values(mapper, ...)

# S3 method for class 'bm_multi'
ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...)

# S3 method for class 'bm_collect'
ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...)

# S3 method for class 'bm_repeat'
ibm_values(mapper, ...)

# S3 method for class 'bm_sum'
ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...)

Arguments

mapper

A mapper S3 object, inheriting from bru_mapper.

inla_f

logical; when TRUE for ibm_n() and ibm_values(), the result must be compatible with the INLA::f(...) and corresponding INLA::inla.stack(...) constructions. For ibm_{eval,jacobian,linear}, the input interpretation may be different. Implementations do not normally need to do anything different, except for mappers of the type needed for hidden multicomponent models such as "bym2", which can be handled by bm_collect.

...

Arguments passed on to other methods

multi

logical; If TRUE (or positive), recurse one level into sub-mappers

state

A vector of latent state values for the mapping, of length ibm_n(mapper, inla_f = FALSE)

n_state

integer giving the length of the state vector for mappers that have state dependent output size.

Methods (by class)

  • ibm_values(default): Returns a non-null element 'values' from the mapper object, and seq_len(ibm_n(mapper)) if it doesn't exist.

  • ibm_values(bm_fmesher): Returns an index vector for the mesh basis functions.

  • ibm_values(bm_fm_mesh_1d): Returns an index vector into the basis functions for an indexed mapper. Otherwise, the mid values if present in the mesh being mapped, and otherwise returns the loc values of the mesh.

  • ibm_values(bm_linear): Returns 1.0

  • ibm_values(bm_matrix): For integer labels, the vector of labels. For character labels, the labels as a factor variable.

  • ibm_values(bm_factor): Returns the factor levels (minus the first level for factor_mapping "contrast"), or an integer vector (if indexed = TRUE in bm_factor()).

See also

Other mapper methods: bru_mapper_generics, ibm_eval(), ibm_eval2(), ibm_inla_subset(), ibm_invalid_output(), ibm_is_linear(), ibm_jacobian(), ibm_linear(), ibm_n(), ibm_n_output(), ibm_names(), ibm_simplify()

Other specific bm_fmesher method implementations: bm_fmesher(), ibm_jacobian(), ibm_n()

Other specific bm_fm_mesh_1d method implementations: bm_fm_mesh_1d, ibm_jacobian(), ibm_n()

Other specific bm_taylor method implementations: bm_taylor(), ibm_eval(), ibm_jacobian(), ibm_n(), ibm_n_output()

Other specific bm_linear method implementations: bm_linear(), ibm_jacobian(), ibm_n()

Other specific bm_matrix method implementations: bm_matrix(), ibm_jacobian(), ibm_n()

Other specific bm_factor method implementations: bm_factor(), ibm_jacobian(), ibm_n()

Other specific bm_const method implementations: bm_const(), ibm_eval(), ibm_jacobian(), ibm_n()

Other specific bm_shift method implementations: bm_shift(), ibm_eval(), ibm_jacobian(), ibm_n(), ibm_n_output()

Other specific bm_scale method implementations: bm_scale(), ibm_eval(), ibm_jacobian(), ibm_n(), ibm_n_output()

Other specific bm_aggregate method implementations: bm_aggregate(), ibm_eval(), ibm_jacobian(), ibm_n(), ibm_n_output()

Other specific bm_marginal method implementations: bm_marginal(), ibm_eval(), ibm_jacobian(), ibm_n(), ibm_n_output()

Other specific bm_pipe method implementations: bm_pipe(), ibm_eval(), ibm_eval2(), ibm_jacobian(), ibm_n(), ibm_n_output(), ibm_simplify()

Other specific bm_multi method implementations: bm_multi(), ibm_eval(), ibm_invalid_output(), ibm_is_linear(), ibm_jacobian(), ibm_linear(), ibm_n(), ibm_n_output(), ibm_names()

Other specific bm_collect method implementations: bm_collect(), ibm_eval(), ibm_invalid_output(), ibm_is_linear(), ibm_jacobian(), ibm_linear(), ibm_n(), ibm_n_output(), ibm_names()

Other specific bm_repeat method implementations: bm_repeat(), ibm_eval(), ibm_invalid_output(), ibm_jacobian(), ibm_linear(), ibm_n(), ibm_n_output()

Other specific bm_sum method implementations: bm_sum(), ibm_eval(), ibm_invalid_output(), ibm_is_linear(), ibm_jacobian(), ibm_linear(), ibm_n(), ibm_n_output(), ibm_names()