Learn R Programming

INLAtools (version 0.0.8)

INLAtools-methods: 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)

# S3 method for default prec(model, ...)

# S4 method for Matrix vcov(object, ...)

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.

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

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

See Also

prior.cgeneric()