Skip to contents

Implementations must return a (sparse) matrix of size ibm_n_output(mapper, input, inla_f) by ibm_n(mapper, inla_f = FALSE). The inla_f=TRUE argument should only affect the allowed type of input format.

Usage

ibm_jacobian(mapper, input, state = NULL, inla_f = FALSE, ...)

# Default S3 method
ibm_jacobian(mapper, input, state = NULL, ...)

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

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

# S3 method for class 'bm_index'
ibm_jacobian(mapper, input, state, ...)

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

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

# S3 method for class 'bm_matrix'
ibm_jacobian(mapper, input, state = NULL, inla_f = FALSE, ...)

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

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

# S3 method for class 'bm_shift'
ibm_jacobian(mapper, input, state = NULL, ..., sub_lin = NULL)

# S3 method for class 'bm_scale'
ibm_jacobian(mapper, input, state = NULL, ..., sub_lin = NULL)

# S3 method for class 'bm_aggregate'
ibm_jacobian(mapper, input, state = NULL, ...)

# S3 method for class 'bm_logsumexp'
ibm_jacobian(mapper, input, state = NULL, ...)

# S3 method for class 'bm_marginal'
ibm_jacobian(mapper, input, state = NULL, ..., reverse = FALSE)

# S3 method for class 'bm_pipe'
ibm_jacobian(mapper, input, state = NULL, ...)

# S3 method for class 'bm_multi'
ibm_jacobian(
  mapper,
  input,
  state = NULL,
  inla_f = FALSE,
  multi = FALSE,
  ...,
  sub_A = NULL
)

# S3 method for class 'bm_harmonics'
ibm_jacobian(mapper, input, state = NULL, inla_f = FALSE, ...)

# S3 method for class 'bm_collect'
ibm_jacobian(
  mapper,
  input,
  state = NULL,
  inla_f = FALSE,
  multi = FALSE,
  ...,
  sub_lin = NULL
)

# S3 method for class 'bm_repeat'
ibm_jacobian(
  mapper,
  input,
  state = NULL,
  inla_f = FALSE,
  multi = FALSE,
  ...,
  sub_lin = NULL
)

# S3 method for class 'bm_sum'
ibm_jacobian(
  mapper,
  input,
  state = NULL,
  inla_f = FALSE,
  multi = FALSE,
  ...,
  sub_lin = NULL
)

Arguments

mapper

A mapper S3 object, inheriting from bru_mapper.

input

Data input for the mapper.

state

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

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

sub_lin

Internal, optional pre-computed sub-mapper information

reverse

logical; control bm_marginal evaluation. Default FALSE. When TRUE, reverses the direction of the mapping, see details for marginal mappers.

sub_A

Internal; precomputed Jacobian matrices.

Methods (by class)

  • ibm_jacobian(default): Mapper classes must implement their own ibm_jacobian method.

  • ibm_jacobian(bm_fmesher): Returns the fmesher::fm_basis() matrix of the mesh being mapped.

  • ibm_jacobian(bm_fm_mesh_1d): Returns the fmesher::fm_basis() matrix of the mesh being mapped.

  • ibm_jacobian(bm_matrix): Accepts input as a matrix, Matrix, Spatial, or sfc_POINT object.

  • ibm_jacobian(bm_shift): input NULL values are interpreted as no shift.

  • ibm_jacobian(bm_scale): input NULL values are interpreted as no scaling.

  • ibm_jacobian(bm_aggregate): input should be a list with elements block and weights. block should be a vector of the same length as the state, or NULL, with NULL equivalent to all-1. If weights is NULL, it's interpreted as all-1.

  • ibm_jacobian(bm_logsumexp): input should be a list with elements block and weights. block should be a vector of the same length as the state, or NULL, with NULL equivalent to all-1. If weights is NULL, it's interpreted as all-1.

  • ibm_jacobian(bm_marginal): Non-NULL input values are interpreted as a parameter list for qfun, overriding that of the mapper itself.

  • ibm_jacobian(bm_multi): Accepts a list with named entries, or a list with unnamed but ordered elements. The names must match the sub-mappers, see ibm_names.bm_multi(). Each list element should take a format accepted by the corresponding sub-mapper. In case each element is a vector, the input can be given as a data.frame with named columns, a matrix with named columns, or a matrix with unnamed but ordered columns.

  • ibm_jacobian(bm_collect): Accepts a list with named entries, or a list with unnamed but ordered elements. The names must match the sub-mappers, see ibm_names.bm_collect(). Each list element should take a format accepted by the corresponding sub-mapper. In case each element is a vector, the input can be given as a data.frame with named columns, a matrix with named columns, or a matrix with unnamed but ordered columns. When inla_f=TRUE and hidden=TRUE in the mapper definition, the input format should instead match that of the first, non-hidden, sub-mapper.

  • ibm_jacobian(bm_repeat): The input should take the format of the repeated submapper.

  • ibm_jacobian(bm_sum): Accepts a list with named entries, or a list with unnamed but ordered elements. The names must match the sub-mappers, see ibm_names.bm_sum(). Each list element should take a format accepted by the corresponding sub-mapper. In case each element is a vector, the input can be given as a data.frame with named columns, a matrix with named columns, or a matrix with unnamed but ordered columns.

See also

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

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

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

Other specific bm_index method implementations: bm_index(), ibm_invalid_output()

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

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

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

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

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

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

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

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

Other specific bm_logsumexp method implementations: bm_logsumexp(), ibm_eval()

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

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

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

Other specific bm_harmonics method implementations: bm_harmonics(), ibm_n()

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

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

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