cgeneric {INLAtools} | R Documentation |
Defines a GMRF model to be used with the
C interface for INLA
as a latent model.
Description
This prepare data for the C type to organize data needed
for building latent models which are characterized
from given model parameters \theta
and the
the following model elements.
-
graph
to define the non-zero precision matrix pattern. only the upper triangle including the diagonal is needed. The order should be by line. -
Q
vector where thefirst element (N) is the size of the matrix,
second element (M) is the number of non-zero elements in the upper part (including) diagonal
the remaining (M) elements are the actual precision (upper triangle plus diagonal) elements whose order shall follow the graph definition.
-
mu
the mean vector, -
initial
vector withfirst element as the number of the parameters in the model
remaining elements should be the initials for the model parameters.
-
log.norm.const
log of the normalizing constant. -
log.prior
log of the prior for the model parameters.
See details in INLA::cgeneric()
Usage
cgeneric(model, ...)
Arguments
model |
object class for what a |
... |
additional arguments passed on to methods |
Value
named list of cgeneric
class containing
the named list f
that contain model
(a character
always equal to cgeneric
), n
(integer)
and cgeneric
as a named list that contains the
data needed to define the model. Each element on
...$f$cgeneric is also a named list containing
ints
, doubles
, characters
, matrices
and smatrices
.
See Also
INLA::cgeneric()
and methods()