sample_GMRF: Sample from a GMRF

Description Usage Arguments Value Examples

Description

Takes a GMRF object and, possibly, associated permutation matrix and Cholesky factor of permuted precision matrix, to generate samples.

Usage

1
sample_GMRF(G, L = NULL, reps = 1, P = NULL)

Arguments

G

object of class GMRF

L

Cholesky factor of the precision matrix, if P is NULL then this is treated as the factor of an unpermuted matrix

reps

number of samples to generate

P

permutation matrix

Value

a matrix of size n by reps

Examples

1
2
3
G <- GMRF_RW()
G <- setPrecision(G, getPrecision(G) + 0.01*Imat(nrow(G)))
X <- sample_GMRF(G,reps=10)

andrewzm/atminv documentation built on May 10, 2019, 11:14 a.m.