Mapper for linear Taylor approximationsSource:
Provides a pre-computed affine mapping,
internally used to represent and evaluate linearisation information.
state0 information indicates for which state the
offset was evaluated;
The affine mapper output is defined as
effect(state) = offset + jacobian %*% (state - state0)
bru_mapper_taylor( offset = NULL, jacobian = NULL, state0 = NULL, values_mapper = NULL ) # S3 method for bru_mapper_taylor ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...) # S3 method for bru_mapper_taylor ibm_n_output(mapper, input, ...) # S3 method for bru_mapper_taylor ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...) # S3 method for bru_mapper_taylor ibm_jacobian(mapper, ..., multi = FALSE) # S3 method for bru_mapper_taylor ibm_eval(mapper, input = NULL, state = NULL, ...)
bru_mapper_taylor, an offset vector evaluated at
state0. May be
NULL, interpreted as an all-zero vector of length determined by a non-null Jacobian.
bru_mapper_taylor(), the Jacobian matrix, evaluated at
state0, or, a named list of such matrices. May be
NULLor an empty list, for a constant mapping.
bru_mapper_taylor, the state the linearisation was evaluated at, or a list of length matching the
NULLis interpreted as 0.
mapper object to be used for
inla_f=TRUE(experimental, currently unused)
A mapper S3 object, inheriting from
ibm_values(), the result must be compatible with the
inputinterpretation 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
TRUE(or positive), recurse one level into sub-mappers
Arguments passed on to other methods
Data input for the mapper.
A vector of latent state values for the mapping, of length
ibm_n(mapper, inla_f = FALSE)
ibm_eval.bru_mapper_taylor()evaluates linearised mapper information at the given
inputargument is ignored, so that the usual argument order
ibm_eval(mapper, input, state)syntax can be used, but also
ibm_eval(mapper, state = state). For a mapper with a named jacobian list, the
stateargument must also be a named list. If
NULL, all-zero is assumed.