View source: R/old-juvdens-functions.R
simeQ | R Documentation |
Details
simeQ(eQ, k = 1, tol = 1e-09, rank = NULL)
eQ |
an eigen decomposition of a symmetric positive semi-definate matrix corresponding to an inhomogenous GMRF |
k |
todo |
tol |
tolerance in deciding what is rank deficiency |
rank |
prespecify the rank |
This function does stuff.
a single draw from with the appropriate covariance structure
getQMat
for creating a GMRF from a graph
#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))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.