% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mappers.R, R/mapper_collect.R,
%   R/mapper_repeat.R, R/mapper_sum.R
\name{ibm_values}
\alias{ibm_values}
\alias{ibm_values.default}
\alias{ibm_values.bm_fmesher}
\alias{ibm_values.bm_fm_mesh_1d}
\alias{ibm_values.bm_taylor}
\alias{ibm_values.bm_linear}
\alias{ibm_values.bm_matrix}
\alias{ibm_values.bm_factor}
\alias{ibm_values.bm_const}
\alias{ibm_values.bm_shift}
\alias{ibm_values.bm_scale}
\alias{ibm_values.bm_aggregate}
\alias{ibm_values.bm_marginal}
\alias{ibm_values.bm_pipe}
\alias{ibm_values.bm_multi}
\alias{ibm_values.bm_reparam}
\alias{ibm_values.bm_collect}
\alias{ibm_values.bm_repeat}
\alias{ibm_values.bm_sum}
\title{Value vector for a mapping}
\usage{
ibm_values(mapper, inla_f = FALSE, ...)

\method{ibm_values}{default}(mapper, inla_f = FALSE, ...)

\method{ibm_values}{bm_fmesher}(mapper, ...)

\method{ibm_values}{bm_fm_mesh_1d}(mapper, ...)

\method{ibm_values}{bm_taylor}(mapper, inla_f = FALSE, multi = FALSE, ...)

\method{ibm_values}{bm_linear}(mapper, ...)

\method{ibm_values}{bm_matrix}(mapper, ...)

\method{ibm_values}{bm_factor}(mapper, ...)

\method{ibm_values}{bm_const}(mapper, ...)

\method{ibm_values}{bm_shift}(mapper, ..., state = NULL, n_state = NULL)

\method{ibm_values}{bm_scale}(mapper, ..., state = NULL, n_state = NULL)

\method{ibm_values}{bm_aggregate}(mapper, ..., state = NULL, n_state = NULL)

\method{ibm_values}{bm_marginal}(mapper, ..., state = NULL, n_state = NULL)

\method{ibm_values}{bm_pipe}(mapper, ...)

\method{ibm_values}{bm_multi}(mapper, inla_f = FALSE, multi = FALSE, ...)

\method{ibm_values}{bm_reparam}(mapper, ...)

\method{ibm_values}{bm_collect}(mapper, inla_f = FALSE, multi = FALSE, ...)

\method{ibm_values}{bm_repeat}(mapper, ...)

\method{ibm_values}{bm_sum}(mapper, inla_f = FALSE, multi = FALSE, ...)
}
\arguments{
\item{mapper}{A mapper S3 object, inheriting from \code{bru_mapper}.}

\item{inla_f}{logical; when \code{TRUE} for \code{ibm_n()} and \code{ibm_values()}, the
result must be compatible with the \code{INLA::f(...)} and corresponding
\code{INLA::inla.stack(...)} constructions.  For \verb{ibm_\{eval,jacobian,linear\}},
the \code{input} 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 by \code{bm_collect}.}

\item{...}{Arguments passed on to other methods}

\item{multi}{logical;
If \code{TRUE} (or positive), recurse one level into sub-mappers}

\item{state}{A vector of latent state values for the mapping,
of length \code{ibm_n(mapper, inla_f = FALSE)}}

\item{n_state}{integer giving the length of the state vector for mappers
that have state dependent output size.}
}
\description{
When \code{inla_f=TRUE}, implementations must return a vector that
would be interpretable by an \code{INLA::f(..., values = ...)} specification.
The exception is the method for \code{bm_multi}, that returns a
multi-column data frame if \code{multi=TRUE}.
}
\section{Methods (by class)}{
\itemize{
\item \code{ibm_values(default)}: Returns a non-null element
'values' from the mapper object, and \code{seq_len(ibm_n(mapper))} if
it doesn't exist.

\item \code{ibm_values(bm_fmesher)}: Returns an index vector for the mesh basis functions.

\item \code{ibm_values(bm_fm_mesh_1d)}: Returns an index vector into the basis functions for
an indexed mapper. Otherwise, the \code{mid} values if present in the mesh being
mapped, and otherwise returns the \code{loc} values of the mesh.

\item \code{ibm_values(bm_linear)}: Returns \code{1.0}

\item \code{ibm_values(bm_matrix)}: For integer labels, the vector of labels.
For character labels, the labels as a factor variable.

\item \code{ibm_values(bm_factor)}: Returns the factor levels (minus the first level for
\code{factor_mapping} "contrast"), or an integer vector (if \code{indexed = TRUE} in
\code{\link[=bm_factor]{bm_factor()}}).

}}
\seealso{
Other mapper methods: 
\code{\link{bru_mapper_generics}},
\code{\link{ibm_eval}()},
\code{\link{ibm_eval2}()},
\code{\link{ibm_inla_subset}()},
\code{\link{ibm_invalid_output}()},
\code{\link{ibm_is_linear}()},
\code{\link{ibm_is_rowwise}()},
\code{\link{ibm_jacobian}()},
\code{\link{ibm_linear}()},
\code{\link{ibm_n}()},
\code{\link{ibm_n_output}()},
\code{\link{ibm_names}()},
\code{\link{ibm_simplify}()}
}
\concept{mapper methods}
