makeprec {spam}R Documentation

Create Precision Matrices

Description

Creates precision matrices for gridded GMRF.

Usage

make.prec(par, dims, model = "m1p1",  eps = .Spam$eps)

Arguments

par

parameters used to construct the matrix.

dims

dimension of the grid.

model

see details and examples.

eps

A tolerance parameter: elements of 'x' such that 'abs(x) <= eps' set to zero. Defaults to 'eps = .Spam$eps'

Details

The function should be illustrative on how to create precision matrices for gridded GMRF. Hence, no testing (positive definiteness is done). Please see the examples on the meaning of the different models.

Value

A spam matrix of dimension prod(dims)xprod(dims).

Author(s)

Reinhard Furrer

See Also

toeplitz.spam, kronecker.spam

Examples

as.matrix(make.prec(c(.4),         c(4,3),'m1p1'))
as.matrix(make.prec(c(.4,.3),      c(4,3),'m1p2'))
as.matrix(make.prec(c(.4,.3,.2),   c(4,3),'m2p3'))
as.matrix(make.prec(c(.4,.3,.2,.1),c(4,3),'m2p4'))


[Package spam version 0.28-0 Index]