methods {INLAtools} | R Documentation |
Methods to work with a model
.
Description
For a given model object query the initial
,
mu
, log prior
, graph
or precision prec
can be evaluated/retrieved.
Usage
initial(model)
mu(model, theta)
prior(model, theta)
graph(model, optimize)
prec(model, theta, optimize)
## Default S3 method:
prec(model, ...)
## S4 method for signature 'Matrix'
vcov(object, ...)
## S3 method for class 'inla'
prec(model, ...)
Arguments
model |
object to represent a model |
theta |
numeric vector.
For |
optimize |
logical indicating if it is to be returned only the elements and not as a sparse matrix. |
... |
additional arguments passed on |
object |
Matrix supposed to be a sparse precision matrix |
Value
the result of the desired query of the 'cgeneric' model. 'graph' and 'prec' can be either a vector (if optimize = TRUE) or a sparse matrix.
Functions
-
initial()
: Retrieve the initial model parameter(s) -
mu()
: Evaluate the model's mean -
prior()
: Evaluate the log-prior for a giventheta
-
graph()
: Retrieve the models' graph -
prec()
: Retrieve the precision for a giventheta
-
prec(default)
: The default precision method computes the inverse of the variance -
vcov(Matrix)
: Thevcov
method for sparse matrices -
prec(inla)
: Define the prec method for an inla output object