simQ: Simulate from an inhomogenous GMRF

View source: R/old-juvdens-functions.R

simQR Documentation

Simulate from an inhomogenous GMRF

Description

Details

Usage

simQ(Q, tol = 1e-09, rank = NULL)

Arguments

Q

a symmetric positive semi-definate matrix corresponding to an inhomogenous GMRF

tol

tolerance in deciding what is rank deficiency

rank

prespecify the rank

Details

This function does stuff.

Value

a single draw from with the appropriate covariance structure

See Also

getQMat for creating a GMRF from a graph

Examples

#wk <- ctm[ctm $ CATCHMENT %in% c(3:13, 15:50),]
## work out neighbours
#wk_nb <- poly2nb(wk, queen = TRUE)
## create a rw2 GMRF precision matrix and simulate some spatial
## structure
#Q <- getQMat(wk_nb)
#x <- simQ(exp(-4)*Q)
#plot(wk, col = grey( pmax(0, pmin(1, (x + 5) / 10))))

Faskally/CLmodel documentation built on Sept. 21, 2023, 1:15 p.m.