Size of the latent vector of a mapping
Source:R/mappers.R
, R/mapper_collect.R
, R/mapper_repeat.R
, and 1 more
ibm_n.Rd
Implementations must return the size of the latent vector being mapped to.
Usage
ibm_n(mapper, inla_f = FALSE, ...)
# Default S3 method
ibm_n(mapper, inla_f = FALSE, ...)
# S3 method for class 'bm_fmesher'
ibm_n(mapper, ...)
# S3 method for class 'bm_fm_mesh_1d'
ibm_n(mapper, ...)
# S3 method for class 'bm_taylor'
ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...)
# S3 method for class 'bm_linear'
ibm_n(mapper, ...)
# S3 method for class 'bm_matrix'
ibm_n(mapper, ...)
# S3 method for class 'bm_factor'
ibm_n(mapper, ...)
# S3 method for class 'bm_const'
ibm_n(mapper, ...)
# S3 method for class 'bm_shift'
ibm_n(mapper, ..., state = NULL, n_state = NULL)
# S3 method for class 'bm_scale'
ibm_n(mapper, ..., state = NULL, n_state = NULL)
# S3 method for class 'bm_aggregate'
ibm_n(mapper, ..., input = NULL, state = NULL, n_state = NULL)
# S3 method for class 'bm_marginal'
ibm_n(mapper, ..., state = NULL, n_state = NULL)
# S3 method for class 'bm_pipe'
ibm_n(mapper, ..., input = NULL, state = NULL)
# S3 method for class 'bm_multi'
ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...)
# S3 method for class 'bm_harmonics'
ibm_n(mapper, inla_f = FALSE, ...)
# S3 method for class 'bm_collect'
ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...)
# S3 method for class 'bm_repeat'
ibm_n(mapper, ...)
# S3 method for class 'bm_sum'
ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...)
Arguments
- mapper
A mapper S3 object, inheriting from
bru_mapper
.- 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
.- ...
Arguments passed on to other methods
- multi
logical; If
TRUE
(or positive), recurse one level into sub-mappers- state
A vector of latent state values for the mapping, of length
ibm_n(mapper, inla_f = FALSE)
- n_state
integer giving the length of the state vector for mappers that have state dependent output size.
- input
Data input for the mapper.
Methods (by class)
ibm_n(default)
: Returns a non-null element 'n' from the mapper object, and gives an error if it doesn't exist. Ifinla_f=TRUE
, first checks for a 'n_inla' element.ibm_n(bm_fmesher)
: Returns thefmesher::fm_dof()
value of the mesh being mapped.ibm_n(bm_fm_mesh_1d)
: Returns thefmesher::fm_dof()
value of the mesh being mapped.ibm_n(bm_linear)
: Returns1L
ibm_n(bm_matrix)
: Returns the number of columns in the matrix mapper.ibm_n(bm_factor)
: Returns the number of levels whenfactor_mapping
is "full", and the number of levels minus one iffactor_mapping
is "contrast".
See also
Other mapper methods:
bru_mapper_generics
,
ibm_eval()
,
ibm_eval2()
,
ibm_inla_subset()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_linear()
,
ibm_n_output()
,
ibm_names()
,
ibm_simplify()
,
ibm_values()
Other specific bm_fmesher method implementations:
bm_fmesher()
,
ibm_jacobian()
,
ibm_values()
Other specific bm_fm_mesh_1d method implementations:
bm_fm_mesh_1d
,
ibm_jacobian()
,
ibm_values()
Other specific bm_taylor method implementations:
bm_taylor()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_values()
Other specific bm_linear method implementations:
bm_linear()
,
ibm_jacobian()
,
ibm_values()
Other specific bm_matrix method implementations:
bm_matrix()
,
ibm_jacobian()
,
ibm_values()
Other specific bm_factor method implementations:
bm_factor()
,
ibm_jacobian()
,
ibm_values()
Other specific bm_const method implementations:
bm_const()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_values()
Other specific bm_shift method implementations:
bm_shift()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_values()
Other specific bm_scale method implementations:
bm_scale()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_values()
Other specific bm_aggregate method implementations:
bm_aggregate()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_values()
Other specific bm_marginal method implementations:
bm_marginal()
,
ibm_eval()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_values()
Other specific bm_pipe method implementations:
bm_pipe()
,
ibm_eval()
,
ibm_eval2()
,
ibm_jacobian()
,
ibm_n_output()
,
ibm_simplify()
,
ibm_values()
Other specific bm_multi method implementations:
bm_multi()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_linear()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()
Other specific bm_harmonics method implementations:
bm_harmonics()
,
ibm_jacobian()
Other specific bm_collect method implementations:
bm_collect()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_linear()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()
Other specific bm_repeat method implementations:
bm_repeat()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_jacobian()
,
ibm_linear()
,
ibm_n_output()
,
ibm_values()
Other specific bm_sum method implementations:
bm_sum()
,
ibm_eval()
,
ibm_invalid_output()
,
ibm_is_linear()
,
ibm_jacobian()
,
ibm_linear()
,
ibm_n_output()
,
ibm_names()
,
ibm_values()