Implementations must return a list with elements offset and jacobian.
The input contents must
be in a format accepted by ibm_jacobian()
for the mapper.
Usage
ibm_eval2(mapper, input, state = NULL, ...)
# Default S3 method
ibm_eval2(mapper, input, state = NULL, ...)
# S3 method for class 'bm_pipe'
ibm_eval2(mapper, input, state = NULL, ...)
# S3 method for class 'bm_expr'
ibm_eval2(mapper, input, state = NULL, ..., data = NULL)
# S3 method for class 'bru_obs'
ibm_eval2(
mapper,
input,
state,
...,
multi = FALSE,
comp_mappers,
eval_fun = NULL
)
# S3 method for class 'bru_obs_list'
ibm_eval2(
mapper,
input,
state,
...,
multi = FALSE,
comp_mappers,
eval_fun = 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
- data
should be a list with data objects, with the main object called
data; seebm_expr()for details.- multi
logical; If
TRUE(or positive), recurse one level into sub-mappers- comp_mappers
A list of mappers, typically from
as_bm_list<bru_comp_list>.- eval_fun
A list of functions, typically from
bru_eval_fun().
Value
A list with elements offset and jacobian, where offset is a
vector of length ibm_n_output(mapper, input, state, ...), and jacobian
is a matrix of size ibm_n_output(mapper, input, state, ...) by
ibm_n(mapper, inla_f = FALSE).
Methods (by class)
ibm_eval2(default): Callsjacobian <- ibm_jacobian(...)andoffset <- ibm_eval(..., jacobian = jacobian)and returns a list with elementsoffsetandjacobian, as needed byibm_as_taylor.default()and similar methods. Mapper classes can implement their ownibm_eval2method if joint construction of evaluation and Jacobian is more efficient than separate or sequential construction.
See also
Other mapper methods:
bru_mapper_generics,
ibm_as_taylor(),
ibm_eval(),
ibm_inla_subset(),
ibm_invalid_output(),
ibm_is_linear(),
ibm_is_rowwise(),
ibm_jacobian(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_simplify(),
ibm_values()