methods: Methods to work with a 'model'.

methodsR 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 prior it can be a numeric matrix, with number of lines equal the size of theta and each column as a different case.

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 given theta

  • graph(): Retrieve the models' graph

  • prec(): Retrieve the precision for a given theta

  • prec(default): The default precision method computes the inverse of the variance

  • vcov(Matrix): The vcov method for sparse matrices

  • prec(inla): Define the prec method for an inla output object

See Also

prior.cgeneric()


INLAtools documentation built on June 23, 2025, 5:09 p.m.

Related to methods in INLAtools...