simQ | R Documentation |
Details
simQ(Q, tol = 1e-09, rank = NULL)
Q |
a symmetric positive semi-definate matrix corresponding to the precision matrix of an inhomogenous GMRF |
tol |
tolerance (relative to largest eigen value) for numerical lack of positive-definiteness in ‘Q’. |
rank |
the rank of the precision matrix. If this is not supplied it it is estimated by comparing the eigen values to tol * largest eigenvalue |
This function does stuff.
a single draw from with the appropriate covariance structure
## create a rw2 GMRF precision matrix and simulate
Q <- getQrw(100, order = 2)
x <- simQ(Q)
plot(x)
##
## simulate an AR1 GMRF with toroidal edge correction
Q <- getQar(100, phi = 0.8)
x <- simQ(exp(5)*Q)
plot(x, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.