Compute a mapper linearisation
Source:R/mappers.R
, R/mapper_collect.R
, R/mapper_repeat.R
, and 2 more
ibm_linear.Rd
Implementations must return a bm_taylor object
The linearisation information includes offset
, jacobian
, and state0
.
The state information indicates for which state the offset
was evaluated,
with NULL
meaning all-zero.
The linearised mapper output is defined as
The default method calls ibm_eval()
and ibm_jacobian()
to generate
the needed information.
Usage
ibm_linear(mapper, input, state = NULL, ...)
# Default S3 method
ibm_linear(mapper, input, state, ...)
# S3 method for class 'bm_multi'
ibm_linear(mapper, input, state, inla_f = FALSE, ...)
# S3 method for class 'bm_collect'
ibm_linear(mapper, input, state, inla_f = FALSE, ...)
# S3 method for class 'bm_repeat'
ibm_linear(mapper, input, state, ...)
# S3 method for class 'bm_sum'
ibm_linear(mapper, input, state, ...)
# S3 method for class 'bru_comp'
ibm_linear(mapper, input, state = 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)
- ...
Arguments passed on to other methods
- inla_f
logical; when
TRUE
foribm_n()
andibm_values()
, the result must be compatible with theINLA::f(...)
and correspondingINLA::inla.stack(...)
constructions. Foribm_{eval,jacobian,linear}
, theinput
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 bybm_collect
.
Value
A bm_taylor object.
The state0
information in the affine mapper indicates for which state
the offset
was evaluated; The affine mapper output is defined as
Methods (by class)
ibm_linear(default)
: Callsibm_eval2()
and returns a bm_taylor object.
See also
Other mapper methods:
bru_mapper_generics
,
ibm_eval()
,
ibm_eval2()
,
ibm_inla_subset()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_n()
,
ibm_n_output()
,
ibm_names()
,
ibm_simplify()
,
ibm_values()
Other specific bm_multi method implementations:
bm_multi()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_n()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()
Other specific bm_collect method implementations:
bm_collect()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_n()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()
Other specific bm_repeat method implementations:
bm_repeat()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_jacobian()
,
ibm_n()
,
ibm_n_output()
,
ibm_values()
Other specific bm_sum method implementations:
bm_sum()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_n()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()