| ibm_jacobian | R Documentation |
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.
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, ...)
## S3 method for class 'bm_scale'
ibm_jacobian(mapper, input, state = 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_logitaverage'
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_reparam'
ibm_jacobian(mapper, input, state = NULL, ...)
## 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_expr'
ibm_jacobian(
mapper,
input,
state = NULL,
inla_f = FALSE,
...,
derived = NULL,
jacobians = NULL,
data = NULL,
multi = FALSE,
offset = NULL,
eps = 1e-06,
.envir = rlang::caller_env()
)
## S3 method for class 'bru_obs'
ibm_jacobian(
mapper,
input,
state,
...,
multi = FALSE,
comp_mappers,
eval_fun = NULL
)
## S3 method for class 'bru_obs_list'
ibm_jacobian(
mapper,
input,
state,
...,
multi = FALSE,
comp_mappers,
eval_fun = 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
)
mapper |
A mapper S3 object, inheriting from |
input |
Data input for the mapper. |
state |
A vector of latent state values for the mapping,
of length |
inla_f |
logical; when |
... |
Arguments passed on to other methods |
multi |
logical;
If |
reverse |
logical; control |
sub_A |
Internal; precomputed Jacobian matrices. |
sub_lin |
Internal, optional pre-computed sub-mapper information |
derived |
The state vectors of variables derived from the root
variables. If |
jacobians |
The state vectors of variables derived from the root
If |
data |
A list with data objects, with the main object called |
offset |
The offset value, pre-calculated by |
eps |
The finite difference step size to use for numerical
differentiation. Default is |
.envir |
The environment for the expression evaluation. By default, this is set to the caller environment. |
comp_mappers |
A list of mappers, typically from
|
eval_fun |
A list of functions, typically from
|
A (sparse) matrix of size ibm_n_output(mapper, input, inla_f) by
ibm_n(mapper, inla_f = FALSE).
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_logitaverage): 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_expr): Accepts a state list with named entries, one for each variable.
The input format should match the description given for bm_expr().
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.
Other mapper methods:
bru_mapper_generics,
ibm_as_taylor(),
ibm_eval(),
ibm_eval2(),
ibm_inla_subset(),
ibm_invalid_output(),
ibm_is_linear(),
ibm_is_rowwise(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_simplify(),
ibm_values()
m <- bm_linear()
ibm_jacobian(m, input = c(1, 3, 4, 5, 2), state = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.