makeprec: Create Precision Matrices

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Creates precision matrices for gridded GMRF.

Usage

1
precmat.GMRFreglat(n,m, par, model = "m1p1",  eps = getOption("spam.eps"))

Arguments

n

first dimension of the grid.

m

second dimension of the grid.

par

parameters used to construct the matrix.

model

see details and examples.

eps

A tolerance parameter: elements of x such that abs(x) <= eps set to zero. Defaults to eps = getOption("spam.eps")

Details

The function should be illustrative on how to create precision matrices for gridded GMRF. Hence, no testing (positive definiteness is done).

The model specification "m" determines the complexity and "p" the number of parameters.

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

precmat, toeplitz.spam, kronecker.spam

Examples

1
2
3
4
5
6
7
8
as.matrix(precmat.GMRFreglat(4, 3, c(.4),         'm1p1'))
as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3),      'm1p2'))
as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3,.2),   'm2p3'))
as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3,.2,.1),'m2p4'))

# up to the diagonal, the following are equivalent:
cleanup( precmat.IGMRFreglat(3,4) -
             precmat.GMRFreglat(3,4,1, 'm1p1'))

spam documentation built on July 4, 2017, 9:11 a.m.