Methods for bru_mapper objects
Methods for bru_mapper
objects
bru_mapper(...) ibm_n(mapper, ...) ibm_values(mapper, ...) ibm_amatrix(mapper, input, ...) ibm_valid_input(mapper, input, ...) ## Default S3 method: bru_mapper( mapper, new_class = NULL, ibm_n = NULL, ibm_values = NULL, ibm_amatrix = NULL, ibm_valid_input = NULL, ... ) ## S3 method for class 'inla.mesh' bru_mapper(mesh, ...) ## S3 method for class 'inla.mesh.1d' bru_mapper(mesh, indexed = NULL, ...) bru_mapper_index(n = 1L, ...) bru_mapper_linear(...) bru_mapper_factor(values, factor_mapping, ...) bru_mapper_offset(...) bru_mapper_multi(mappers, ...)
... |
Arguments passed on to other methods |
mapper |
A mapper S3 object, normally inheriting from |
input |
The values for which to produce validity information |
new_class |
If non- |
ibm_n |
An |
ibm_values |
An |
ibm_amatrix |
An |
ibm_valid_input |
An |
mesh |
An |
indexed |
logical; If |
n |
Size of a model for |
values |
Input values calculated by |
factor_mapping |
character; selects the type of factor mapping.
|
mappers |
A list of |
bru_mapper
Generic mapper S3 constructor. See below for details of the
default constructor that can be used to define new mappers in user code.
ibm_n
Generic. Implementations must return the size of the latent vector
being mapped to.
ibm_values
Generic. Implementations must return a vector that
is interpretable by an INLA::f(..., values = ...)
specification, and
has length ibm_n()
.
ibm_amatrix
Generic.
Implementations must return a (sparse) matrix of size NROW(input)
(except for the bru_mapper_multi
method)
by ibm_n(mapper)
ibm_valid_input
Generic.
Implementations must return a logical vector of length NROW(input)
bru_mapper.default
adds the "bru_mapper" class and new_class
to an object. If provided, mapper method functions are added to an environment
.envir
in the object. The generic methods ibm_n
, ibm_values
,
ibm_amatrix
, and ibm_valid_input
look for these functions first,
and otherwise call UseMethod()
. This is an alternative to using .S3method()
to register the methods, e.g.
.S3method("ibm_amatrix", "my_mapper_class", ibm_amatrix.my_mapper_class)
.
bru_mapper_multi
constructs a kronecker product mapping
bru_mapper_methods for specific method implementations.
mapper <- bru_mapper_index(5) ibm_amatrix(mapper, c(1,3,4,5,2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.